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

@@ -182,7 +182,7 @@ func isInnerShortcode(t *template.Template) (bool, error) {
}
func createShortcodePlaceholder(id int) string {
return fmt.Sprintf("{@{@%s-%d@}@}", shortcodePlaceholderPrefix, id)
return fmt.Sprintf("{#{#%s-%d#}#}", shortcodePlaceholderPrefix, id)
}
const innerNewlineRegexp = "\n"
@@ -477,8 +477,8 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
sourceLen := len(source)
start := 0
pre := []byte("{@{@" + prefix)
post := []byte("@}@}")
pre := []byte("{#{#" + prefix)
post := []byte("#}#}")
pStart := []byte("<p>")
pEnd := []byte("</p>")