all repos — grayfriday @ 2824a549c31db6cb9ad696d9de0a49f1d04e34bb

blackfriday fork with a few changes

Implement backslash hard line break

See http://spec.commonmark.org/0.18/#example-527
neclepsio neclepsio@gmail.com
Wed, 22 Apr 2015 12:23:19 +0200
commit

2824a549c31db6cb9ad696d9de0a49f1d04e34bb

parent

17bb7999de6cfb791d4f8986cc00b3309b370cdb

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M inline.goinline.go

@@ -167,9 +167,10 @@ }

out.Truncate(eol) precededByTwoSpaces := offset >= 2 && data[offset-2] == ' ' && data[offset-1] == ' ' + precededByBackslash := offset >= 1 && data[offset-1] == '\\' // see http://spec.commonmark.org/0.18/#example-527 // should there be a hard line break here? - if p.flags&EXTENSION_HARD_LINE_BREAK == 0 && !precededByTwoSpaces { + if p.flags&EXTENSION_HARD_LINE_BREAK == 0 && !precededByTwoSpaces && !precededByBackslash { return 0 }