mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-23 21:32:41 +08:00
This commit is contained in:
parent
55b58bd59b
commit
0b745c25e4
@ -440,6 +440,14 @@ You can use various [parameters](https://confluence.atlassian.com/conf59/childre
|
||||
See task MYJIRA-123.
|
||||
```
|
||||
|
||||
### Insert link to existing confluence page by title
|
||||
|
||||
```markdown
|
||||
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:)
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
### Homebrew
|
||||
|
@ -73,6 +73,21 @@ func (renderer ConfluenceRenderer) RenderNode(
|
||||
|
||||
return bf.GoToNext
|
||||
}
|
||||
if node.Type == bf.Link && string(node.Destination[0:3]) == "ac:" {
|
||||
if entering {
|
||||
writer.Write([]byte("<ac:link><ri:page ri:content-title=\""))
|
||||
if len(node.Destination) < 4 {
|
||||
writer.Write(node.FirstChild.Literal)
|
||||
} else {
|
||||
writer.Write(node.Destination[3:])
|
||||
}
|
||||
writer.Write([]byte("\"/><ac:plain-text-link-body><![CDATA["))
|
||||
writer.Write(node.FirstChild.Literal)
|
||||
writer.Write([]byte("]]></ac:plain-text-link-body></ac:link>"))
|
||||
return bf.SkipChildren
|
||||
}
|
||||
return bf.GoToNext
|
||||
}
|
||||
return renderer.Renderer.RenderNode(writer, node, entering)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user