redcarpet 1.12.1 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/xhtml.c +10 -15
- data/lib/redcarpet.rb +1 -1
- data/redcarpet.gemspec +1 -1
- data/test/markdown_test.rb +1 -1
- metadata +4 -16
data/ext/xhtml.c
CHANGED
|
@@ -437,23 +437,20 @@ static int
|
|
|
437
437
|
rndr_raw_html(struct buf *ob, struct buf *text, void *opaque)
|
|
438
438
|
{
|
|
439
439
|
struct xhtml_renderopt *options = opaque;
|
|
440
|
-
int escape_html = 0;
|
|
441
440
|
|
|
442
|
-
if ((options->flags &
|
|
443
|
-
|
|
441
|
+
if ((options->flags & XHTML_SKIP_HTML) != 0)
|
|
442
|
+
return 1;
|
|
444
443
|
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
if ((options->flags & XHTML_SKIP_STYLE) != 0 && is_html_tag(text, "style"))
|
|
445
|
+
return 1;
|
|
447
446
|
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
if ((options->flags & XHTML_SKIP_LINKS) != 0 && is_html_tag(text, "a"))
|
|
448
|
+
return 1;
|
|
450
449
|
|
|
450
|
+
if ((options->flags & XHTML_SKIP_IMAGES) != 0 && is_html_tag(text, "img"))
|
|
451
|
+
return 1;
|
|
451
452
|
|
|
452
|
-
|
|
453
|
-
attr_escape(ob, text->data, text->size);
|
|
454
|
-
else
|
|
455
|
-
bufput(ob, text->data, text->size);
|
|
456
|
-
|
|
453
|
+
bufput(ob, text->data, text->size);
|
|
457
454
|
return 1;
|
|
458
455
|
}
|
|
459
456
|
|
|
@@ -785,10 +782,8 @@ ups_xhtml_renderer(struct mkd_renderer *renderer, unsigned int render_flags)
|
|
|
785
782
|
renderer->autolink = NULL;
|
|
786
783
|
}
|
|
787
784
|
|
|
788
|
-
if (render_flags & XHTML_SKIP_HTML)
|
|
789
|
-
renderer->raw_html_tag = NULL;
|
|
785
|
+
if (render_flags & XHTML_SKIP_HTML)
|
|
790
786
|
renderer->blockhtml = NULL;
|
|
791
|
-
}
|
|
792
787
|
|
|
793
788
|
if (render_flags & XHTML_SMARTYPANTS)
|
|
794
789
|
renderer->normal_text = rndr_smartypants;
|
data/lib/redcarpet.rb
CHANGED
data/redcarpet.gemspec
CHANGED
data/test/markdown_test.rb
CHANGED
|
@@ -42,7 +42,7 @@ class MarkdownTest < Test::Unit::TestCase
|
|
|
42
42
|
|
|
43
43
|
def test_that_filter_html_works
|
|
44
44
|
markdown = Markdown.new('Through <em>NO</em> <script>DOUBLE NO</script>', :filter_html)
|
|
45
|
-
html_equal "<p>Through
|
|
45
|
+
html_equal "<p>Through NO DOUBLE NO</p>", markdown.to_html.strip
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def test_that_bluecloth_restrictions_are_supported
|
metadata
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: redcarpet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
prerelease: false
|
|
6
|
-
segments:
|
|
7
|
-
- 1
|
|
8
|
-
- 12
|
|
9
|
-
- 1
|
|
10
|
-
version: 1.12.1
|
|
4
|
+
version: 1.12.2
|
|
11
5
|
platform: ruby
|
|
12
6
|
authors:
|
|
13
7
|
- "Natacha Port\xC3\xA9"
|
|
@@ -60,27 +54,21 @@ rdoc_options: []
|
|
|
60
54
|
require_paths:
|
|
61
55
|
- lib
|
|
62
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
|
-
none: false
|
|
64
57
|
requirements:
|
|
65
58
|
- - ">="
|
|
66
59
|
- !ruby/object:Gem::Version
|
|
67
|
-
hash: 3
|
|
68
|
-
segments:
|
|
69
|
-
- 0
|
|
70
60
|
version: "0"
|
|
61
|
+
version:
|
|
71
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
|
-
none: false
|
|
73
63
|
requirements:
|
|
74
64
|
- - ">="
|
|
75
65
|
- !ruby/object:Gem::Version
|
|
76
|
-
hash: 3
|
|
77
|
-
segments:
|
|
78
|
-
- 0
|
|
79
66
|
version: "0"
|
|
67
|
+
version:
|
|
80
68
|
requirements: []
|
|
81
69
|
|
|
82
70
|
rubyforge_project:
|
|
83
|
-
rubygems_version: 1.3.
|
|
71
|
+
rubygems_version: 1.3.5
|
|
84
72
|
signing_key:
|
|
85
73
|
specification_version: 3
|
|
86
74
|
summary: Ruby bindings for libupskirt
|