Fix for backtick not working for non-letters

main v0.20.9
Rob Muhlestein 1 year ago
parent a938f46b2e
commit 9d39b6cca5
No known key found for this signature in database
GPG Key ID: 7542BA4ED72E5D81

@ -173,8 +173,8 @@ var begBold = regexp.MustCompile(`^\*{2}\p{L}`)
var endBold = regexp.MustCompile(`^\p{L}\*{2}`)
var begItalic = regexp.MustCompile(`^\*\p{L}`)
var endItalic = regexp.MustCompile(`^\p{L}\*`)
var begCode = regexp.MustCompile(`^` + "`" + `\p{L}`)
var endCode = regexp.MustCompile(`^\p{L}` + "`")
var begCode = regexp.MustCompile(`^` + "`" + `\S`)
var endCode = regexp.MustCompile(`^\S` + "`")
// Emph renders BonzaiMark emphasis spans specifically for
// VT100-compatible terminals (which almost all are today):

@ -172,9 +172,11 @@ func ExampleEmph_code() {
term.Reset = `<reset>`
fmt.Println(Z.Emph("`Code`"))
fmt.Println(Z.Emph("` Code `"))
fmt.Println(Z.Emph("`.git`"))
// Output:
// <code>Code<reset>
// ` Code `
// <code>.git<reset>
}
func ExampleEmph_basics() {

Loading…
Cancel
Save