all repos — grayfriday @ 3d1baecb3d2a8f7db23de78dfd69d2408a6494ac

blackfriday fork with a few changes

Merge pull request #323 from russross/ditch-skip-style

Ditch SkipStyle flag
Vytautas Ĺ altenis vytas@rtfb.lt
Wed, 07 Dec 2016 21:00:43 +0200
commit

3d1baecb3d2a8f7db23de78dfd69d2408a6494ac

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{ "---",