Commit graph

14 commits

Author SHA1 Message Date
yuin
d9c03f07f0 Deprecate Node.Text
Node.Text was intended to get a text value from some inline nodes.
A 'text value' of a Text node is clear.

But

- BaseNode had a default implementation of Node.Text
- Lacks of GoDoc description that Node.Text is valid only for
  some inline nodes

So, some users are using Node.Text for BlockNodes.

A 'text value' for a BlockNode is not clear.

e.g. : Text value of a ListNode

- It should be contains list markers?
- What do characters concatinate List items with? newlines? spaces?
- If it contains codeblocks, codeblocks should be fenced or indented?

Now we would like to avoid such ambiguous method.
2024-10-16 20:47:35 +09:00
yuin
ad1565131a Fix #470 2024-10-15 19:19:41 +09:00
yuin
9b02182dd0 Apply linters 2023-08-15 18:40:41 +09:00
yuin
1dd67d5750 Add CJK extension 2022-09-25 03:31:14 +09:00
yuin
5588d92a56 Support CommonMark 0.30 2021-07-05 00:12:46 +09:00
yuin
036c8738df Fixes #164, Fixes #167 2020-12-26 17:56:42 +09:00
pzl
8bdab9449a
documentation typo fixes 2020-02-14 22:03:49 -05:00
Abhinav Gupta
45376ddb05 ast: Specify types for iota-based constants
Including the type of a constant improves discoverability because the
constant is listed next to the type in the godocs.

Before:

```
$ go doc -all . WalkStatus
type WalkStatus int
    WalkStatus represents a current status of the Walk function.
```

After:

```shell
$ go doc -all . WalkStatus
type WalkStatus int
    WalkStatus represents a current status of the Walk function.

const (
	// WalkStop indicates no more walking needed.
	WalkStop WalkStatus = iota + 1

	// WalkSkipChildren indicates that Walk wont walk on children of current
	// node.
	WalkSkipChildren

	// WalkContinue indicates that Walk can continue to walk.
	WalkContinue
)
```

This commit the `iota`-based constants in the AST package to follow
this.
2019-08-24 12:17:57 -07:00
yuin
05645dd3c4 Add String node 2019-05-30 16:07:04 +09:00
yuin
2ddc99baff Add extension tests, Fix bugs in extensions 2019-05-16 19:46:36 +09:00
yuin
08a89f162a Refactoring 2019-05-05 15:08:50 +09:00
yuin
d4d7acb277 Add a definition list extension, some refactoring 2019-05-02 22:22:05 +09:00
yuin
987f65f813 Performance optimizations 2019-05-01 20:32:41 +09:00
yuin
dd89404e04 first commit 2019-04-26 20:27:01 +09:00