Fix shortcode handling in RST

Fixes #1904
This commit is contained in:
Bjørn Erik Pedersen
2016-03-01 11:03:37 +01:00
parent cc38a40f4e
commit 7f682d7802
3 changed files with 38 additions and 38 deletions

View File

@@ -45,7 +45,7 @@ func (renderer *HugoHtmlRenderer) BlockCode(out *bytes.Buffer, text []byte, lang
}
func (renderer *HugoHtmlRenderer) Link(out *bytes.Buffer, link []byte, title []byte, content []byte) {
if renderer.LinkResolver == nil || bytes.HasPrefix(link, []byte("{@{@HUGOSHORTCODE")) {
if renderer.LinkResolver == nil || bytes.HasPrefix(link, []byte("{§{§HUGOSHORTCODE")) {
// Use the blackfriday built in Link handler
renderer.Renderer.Link(out, link, title, content)
} else {
@@ -58,7 +58,7 @@ func (renderer *HugoHtmlRenderer) Link(out *bytes.Buffer, link []byte, title []b
}
}
func (renderer *HugoHtmlRenderer) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte) {
if renderer.FileResolver == nil || bytes.HasPrefix(link, []byte("{@{@HUGOSHORTCODE")) {
if renderer.FileResolver == nil || bytes.HasPrefix(link, []byte("{§{§HUGOSHORTCODE")) {
// Use the blackfriday built in Image handler
renderer.Renderer.Image(out, link, title, alt)
} else {