Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From v0.10.1
To trunk
2025-02-16
| | |
18:41 |
|
...
(Leaf
check-in: 07ab548853 user: t73fde tags: trunk)
|
18:09 |
|
...
(check-in: 7ac84dda26 user: t73fde tags: trunk)
|
2023-01-30
| | |
12:49 |
|
...
(check-in: ed2d3ce05d user: stern tags: trunk)
|
12:40 |
|
...
(Leaf
check-in: 70b0cdc454 user: stern tags: release, release-0.10, v0.10.1)
|
2023-01-24
| | |
21:47 |
|
...
(check-in: b6301cf091 user: stern tags: trunk, release, v0.10.0)
|
| | |
Changes to .fossil-settings/ignore-glob.
1
2
3
|
1
2
|
-
|
bin/*
releases/*
parser/pikchr/*.out
|
Changes to LICENSE.txt.
1
2
3
4
5
6
7
8
|
1
2
3
4
5
6
7
8
|
-
+
|
Copyright (c) 2020-2023 Detlef Stern
Copyright (c) 2020-present Detlef Stern
Licensed under the EUPL
Zettelstore is licensed under the European Union Public License, version 1.2 or
later (EUPL v. 1.2). The license is available in the official languages of the
EU. The English version is included here. Please see
https://joinup.ec.europa.eu/community/eupl/og_page/eupl for official
|
︙ | | |
Changes to Makefile.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
## Copyright (c) 2020-2022 Detlef Stern
## Copyright (c) 2020-present Detlef Stern
##
## This file is part of Zettelstore.
##
## Zettelstore is licensed under the latest version of the EUPL (European Union
## Public License). Please see file LICENSE.txt for your rights and obligations
## under this license.
.PHONY: check relcheck api build release clean
.PHONY: check relcheck api version build release clean
check:
go run tools/build.go check
go run tools/check/check.go
relcheck:
go run tools/build.go relcheck
go run tools/check/check.go -r
api:
go run tools/build.go testapi
go run tools/testapi/testapi.go
version:
@echo $(shell go run tools/build.go version)
@echo $(shell go run tools/build/build.go version)
build:
go run tools/build.go build
go run tools/build/build.go build
release:
go run tools/build.go release
go run tools/build/build.go release
clean:
go run tools/build.go clean
go run tools/clean/clean.go
|
Changes to README.md.
︙ | | |
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-
-
+
+
-
-
+
|
gradually, one major focus is a long-term store of these notes, hence the name
“Zettelstore”.
To get an initial impression, take a look at the
[manual](https://zettelstore.de/manual/). It is a live example of the
zettelstore software, running in read-only mode.
[Zettelstore Client](https://zettelstore.de/client) provides client
software to access Zettelstore via its API more easily, [Zettelstore
[Zettelstore Client](https://t73f.de/r/zsc) provides client software to access
Zettelstore via its API more easily, [Zettelstore
Contrib](https://zettelstore.de/contrib) contains contributed software, which
often connects to Zettelstore via its API. Some of the software packages may be
experimental.
The software, including the manual, is licensed
under the [European Union Public License 1.2 (or
later)](https://zettelstore.de/home/file?name=LICENSE.txt&ci=trunk).
[Stay](https://twitter.com/zettelstore)
<a rel="me" href="https://nerdculture.de/@zettelstore">tuned</a> …
[Stay tuned](https://mastodon.social/tags/Zettelstore) …
|
Changes to VERSION.
1
|
1
|
-
+
|
0.10.1
0.20.0-dev
|
Changes to ast/ast.go.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
-
+
+
+
+
-
-
-
+
+
+
-
+
|
//-----------------------------------------------------------------------------
// Copyright (c) 2020-2022 Detlef Stern
// Copyright (c) 2020-present Detlef Stern
//
// This file is part of Zettelstore.
//
// Zettelstore is licensed under the latest version of the EUPL (European Union
// Public License). Please see file LICENSE.txt for your rights and obligations
// under this license.
//
// SPDX-License-Identifier: EUPL-1.2
// SPDX-FileCopyrightText: 2020-present Detlef Stern
//-----------------------------------------------------------------------------
// Package ast provides the abstract syntax tree for parsed zettel content.
package ast
import (
"net/url"
"zettelstore.de/z/domain"
"zettelstore.de/z/domain/id"
"zettelstore.de/z/domain/meta"
"t73f.de/r/zsc/domain/id"
"t73f.de/r/zsc/domain/meta"
"zettelstore.de/z/zettel"
)
// ZettelNode is the root node of the abstract syntax tree.
// It is *not* part of the visitor pattern.
type ZettelNode struct {
Meta *meta.Meta // Original metadata
Content domain.Content // Original content
Content zettel.Content // Original content
Zid id.Zid // Zettel identification.
InhMeta *meta.Meta // Metadata of the zettel, with inherited values.
Ast BlockSlice // Zettel abstract syntax tree is a sequence of block nodes.
Syntax string // Syntax / parser that produced the Ast
}
// Node is the interface, all nodes must implement.
|
︙ | | |
Changes to ast/block.go.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
-
+
+
+
+
-
+
|
//-----------------------------------------------------------------------------
// Copyright (c) 2020-2023 Detlef Stern
// Copyright (c) 2020-present Detlef Stern
//
// This file is part of Zettelstore.
//
// Zettelstore is licensed under the latest version of the EUPL (European Union
// Public License). Please see file LICENSE.txt for your rights and obligations
// under this license.
//
// SPDX-License-Identifier: EUPL-1.2
// SPDX-FileCopyrightText: 2020-present Detlef Stern
//-----------------------------------------------------------------------------
package ast
import "zettelstore.de/c/attrs"
import "t73f.de/r/zsc/attrs"
// Definition of Block nodes.
// BlockSlice is a slice of BlockNodes.
type BlockSlice []BlockNode
func (*BlockSlice) blockNode() { /* Just a marker */ }
|
︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
-
+
|
// VerbatimKind specifies the format that is applied to code inline nodes.
type VerbatimKind int
// Constants for VerbatimCode
const (
_ VerbatimKind = iota
VerbatimZettel // Zettel content
VerbatimProg // Program code
VerbatimCode // Program code
VerbatimEval // Code to be externally interpreted. Syntax is stored in default attribute.
VerbatimComment // Block comment
VerbatimHTML // Block HTML, e.g. for Markdown
VerbatimMath // Block math mode
)
func (*VerbatimNode) blockNode() { /* Just a marker */ }
|
︙ | | |
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
-
+
+
+
+
+
+
|
func (*TableNode) blockNode() { /* Just a marker */ }
// WalkChildren walks down to the cells.
func (tn *TableNode) WalkChildren(v Visitor) {
if header := tn.Header; header != nil {
for i := range header {
Walk(v, &header[i].Inlines) // Otherwise changes will not go back
Walk(v, header[i]) // Otherwise changes will not go back
}
}
if rows := tn.Rows; rows != nil {
for _, row := range rows {
for i := range row {
Walk(v, &row[i].Inlines) // Otherwise changes will not go back
}
}
}
}
// WalkChildren walks the list of inline elements.
func (cell *TableCell) WalkChildren(v Visitor) {
Walk(v, &cell.Inlines) // Otherwise changes will not go back
}
//--------------------------------------------------------------------------
// TranscludeNode specifies block content from other zettel to embedded in
// current zettel
type TranscludeNode struct {
Attrs attrs.Attributes
|
︙ | | |
Changes to ast/inline.go.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
//-----------------------------------------------------------------------------
// Copyright (c) 2020-2022 Detlef Stern
// Copyright (c) 2020-present Detlef Stern
//
// This file is part of Zettelstore.
//
// Zettelstore is licensed under the latest version of the EUPL (European Union
// Public License). Please see file LICENSE.txt for your rights and obligations
// under this license.
//
// SPDX-License-Identifier: EUPL-1.2
// SPDX-FileCopyrightText: 2020-present Detlef Stern
//-----------------------------------------------------------------------------
package ast
import (
"unicode/utf8"
"zettelstore.de/c/attrs"
"t73f.de/r/zsc/attrs"
)
// Definitions of inline nodes.
// InlineSlice is a list of BlockNodes.
type InlineSlice []InlineNode
func (*InlineSlice) inlineNode() { /* Just a marker */ }
// CreateInlineSliceFromWords makes a new inline list from words,
// that will be space-separated.
func CreateInlineSliceFromWords(words ...string) InlineSlice {
inl := make(InlineSlice, 0, 2*len(words)-1)
for i, word := range words {
if i > 0 {
inl = append(inl, &SpaceNode{Lexeme: " "})
}
inl = append(inl, &TextNode{Text: word})
}
return inl
}
// WalkChildren walks down to the list.
func (is *InlineSlice) WalkChildren(v Visitor) {
if is != nil {
for _, in := range *is {
Walk(v, in)
for _, in := range *is {
Walk(v, in)
}
}
}
// --------------------------------------------------------------------------
// TextNode just contains some text.
type TextNode struct {
Text string // The text itself.
}
func (*TextNode) inlineNode() { /* Just a marker */ }
// WalkChildren does nothing.
func (*TextNode) WalkChildren(Visitor) { /* No children*/ }
// --------------------------------------------------------------------------
// SpaceNode tracks inter-word space characters.
type SpaceNode struct {
Lexeme string
}
func (*SpaceNode) inlineNode() { /* Just a marker */ }
// WalkChildren does nothing.
func (*SpaceNode) WalkChildren(Visitor) { /* No children*/ }
// Count returns the number of space runes.
func (sn *SpaceNode) Count() int {
return utf8.RuneCountInString(sn.Lexeme)
}
// --------------------------------------------------------------------------
// BreakNode signals a new line that must / should be interpreted as a new line break.
type BreakNode struct {
Hard bool // Hard line break?
}
|
︙ | | |
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
|
// FormatKind specifies the format that is applied to the inline nodes.
type FormatKind int
// Constants for FormatCode
const (
_ FormatKind = iota
FormatEmph // Emphasized text.
FormatStrong // Strongly emphasized text.
FormatInsert // Inserted text.
FormatDelete // Deleted text.
FormatSuper // Superscripted text.
FormatSub // SubscriptedText.
FormatQuote // Quoted text.
FormatSpan // Generic inline container.
FormatEmph // Emphasized text
FormatStrong // Strongly emphasized text
FormatInsert // Inserted text
FormatDelete // Deleted text
FormatSuper // Superscripted text
FormatSub // SubscriptedText
FormatQuote // Quoted text
FormatMark // Marked text
FormatSpan // Generic inline container
)
func (*FormatNode) inlineNode() { /* Just a marker */ }
// WalkChildren walks to the formatted text.
func (fn *FormatNode) WalkChildren(v Visitor) { Walk(v, &fn.Inlines) }
|
︙ | | |
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
-
-
+
-
|
// LiteralKind specifies the format that is applied to code inline nodes.
type LiteralKind int
// Constants for LiteralCode
const (
_ LiteralKind = iota
LiteralZettel // Zettel content
LiteralProg // Inline program code
LiteralCode // Inline program code
LiteralInput // Computer input, e.g. Keyboard strokes
LiteralOutput // Computer output
LiteralComment // Inline comment
LiteralHTML // Inline HTML, e.g. for Markdown
LiteralMath // Inline math mode
)
func (*LiteralNode) inlineNode() { /* Just a marker */ }
// WalkChildren does nothing.
func (*LiteralNode) WalkChildren(Visitor) { /* No children*/ }
|
Changes to ast/ref.go.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-
+
+
+
+
+
-
+
-
+
|
//-----------------------------------------------------------------------------
// Copyright (c) 2020-2022 Detlef Stern
// Copyright (c) 2020-present Detlef Stern
//
// This file is part of Zettelstore.
//
// Zettelstore is licensed under the latest version of the EUPL (European Union
// Public License). Please see file LICENSE.txt for your rights and obligations
// under this license.
//
// SPDX-License-Identifier: EUPL-1.2
// SPDX-FileCopyrightText: 2020-present Detlef Stern
//-----------------------------------------------------------------------------
package ast
import (
"net/url"
"strings"
"t73f.de/r/zsc/api"
"zettelstore.de/z/domain/id"
"t73f.de/r/zsc/domain/id"
)
// QueryPrefix is the prefix that denotes a query expression.
const QueryPrefix = "query:"
const QueryPrefix = api.QueryPrefix
// ParseReference parses a string and returns a reference.
func ParseReference(s string) *Reference {
if invalidReference(s) {
return &Reference{URL: nil, Value: s, State: RefStateInvalid}
}
if strings.HasPrefix(s, QueryPrefix) {
|
︙ | | |
Changes to ast/ref_test.go.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
-
+
+
+
+
|
//-----------------------------------------------------------------------------
// Copyright (c) 2020-2022 Detlef Stern
// Copyright (c) 2020-present Detlef Stern
//
// This file is part of Zettelstore.
//
// Zettelstore is licensed under the latest version of the EUPL (European Union
// Public License). Please see file LICENSE.txt for your rights and obligations
// under this license.
//
// SPDX-License-Identifier: EUPL-1.2
// SPDX-FileCopyrightText: 2020-present Detlef Stern
//-----------------------------------------------------------------------------
package ast_test
import (
"testing"
|
︙ | | |
Added ast/sztrans/sztrans.go.