all repos — grayfriday @ b61f73e4f990f6e45cda852ad41c226a7b3ea97b

blackfriday fork with a few changes

Ditch SkipStyle flag

It's been broken since early 2014, which clearly demonstrates that
nobody uses it.

Fixes #252.
Vytautas Ĺ altenis vytas@rtfb.lt
Thu, 24 Nov 2016 20:37:33 +0200
commit

b61f73e4f990f6e45cda852ad41c226a7b3ea97b

parent

52676fb0053ff19b59451b2aed2a1b8de7d89592

2 files changed, 0 insertions(+), 17 deletions(-)

jump to
M html.gohtml.go

@@ -31,7 +31,6 @@ // HTML renderer configuration options.

const ( HTMLFlagsNone HTMLFlags = 0 SkipHTML HTMLFlags = 1 << iota // Skip preformatted HTML blocks - SkipStyle // Skip embedded <style> elements SkipImages // Skip embedded images SkipLinks // Skip all links Safelink // Only link to trusted protocols

@@ -444,14 +443,7 @@ case HTMLSpan:

if r.Flags&SkipHTML != 0 { break } - if r.Flags&SkipStyle != 0 && isHTMLTag(node.Literal, "style") { - break - } - //if options.safe { - // out(w, "<!-- raw HTML omitted -->") - //} else { r.out(w, node.Literal) - //} case Link: // mark it but don't link it if it is not a safe link: no smartypants dest := node.LinkData.Destination
M inline_test.goinline_test.go

@@ -1119,15 +1119,6 @@ HTMLFlags: SkipImages,

}) } -func TestSkipStyle(t *testing.T) { - doTestsInlineParam(t, []string{ - "foo\n\n<style>color: #f00</style> bar", - "<p>foo</p>\n\n<p>color: #f00 bar</p>\n", - }, TestParams{ - HTMLFlags: SkipStyle, - }) -} - func TestUseXHTML(t *testing.T) { doTestsParam(t, []string{ "---",