diff --git a/README.md b/README.md index 78cb49a..c8f3b8f 100644 --- a/README.md +++ b/README.md @@ -517,6 +517,8 @@ See task MYJIRA-123. This is a [link to an existing confluence page](ac:Pagetitle) And this is how to link when the linktext is the same as the [Pagetitle](ac:) + +Link to a [page title with space]() ``` ### Add width for an image diff --git a/pkg/mark/markdown.go b/pkg/mark/markdown.go index 3c44ab8..680375d 100644 --- a/pkg/mark/markdown.go +++ b/pkg/mark/markdown.go @@ -276,9 +276,8 @@ func (r *ConfluenceRenderer) renderLink(writer util.BufWriter, source []byte, no if err != nil { return ast.WalkStop, err } - - return ast.WalkSkipChildren, nil } + return ast.WalkSkipChildren, nil } return r.goldmarkRenderLink(writer, source, node, entering) } diff --git a/pkg/mark/testdata/links.html b/pkg/mark/testdata/links.html index 3b1f468..625f00e 100644 --- a/pkg/mark/testdata/links.html +++ b/pkg/mark/testdata/links.html @@ -1,5 +1,9 @@

Use https://example.com

Use aaa

+

Use

+

Use

+

Use

+

Use

Use footnotes link 1


diff --git a/pkg/mark/testdata/links.md b/pkg/mark/testdata/links.md index f814795..ce4a282 100644 --- a/pkg/mark/testdata/links.md +++ b/pkg/mark/testdata/links.md @@ -2,5 +2,13 @@ Use Use aaa +Use [page link](ac:Page) + +Use [AnotherPage](ac:) + +Use [Another Page](ac:) + +Use [page link with spaces]() + Use footnotes link [^1] [^1]: a footnote link \ No newline at end of file