rdiscount 2.2.7 → 2.2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/BUILDING +2 -2
- data/ext/VERSION +1 -1
- data/ext/generate.c +20 -13
- data/ext/rdiscount.c +6 -0
- data/ext/ruby-config.h +10 -0
- data/lib/rdiscount.rb +1 -1
- data/rdiscount.gemspec +4 -3
- data/test/rdiscount_test.rb +17 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cf15c9535d4e5016d31ce5259672abac80df8a2e5669adc6e0cb91e8b1fc7d5
|
4
|
+
data.tar.gz: 49d680d21cadadce16d98786249999d0546ff513f043feebbaf4b86aac8a77f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90c7ade6956dc384ba04e2fb212caab6cc3f8b8ef6ee4126114a8bfd668f6dececcabd206c048e31a58d8e1d06d337bd5ba77f94fb4d0e43f8739674fad73acd
|
7
|
+
data.tar.gz: 8e4083908e90fb651cae41fa04c5e059593fe80571cb495e39c500b5baf67f788260c85ba8b778fc5e78800c68e94a4c21a832cb424c7e054ece2365e4b92156
|
data/BUILDING
CHANGED
@@ -17,7 +17,7 @@ grabbing the discount submodule into the root of the project and then running
|
|
17
17
|
the rake gather task to copy discount source files into the ext/ directory:
|
18
18
|
|
19
19
|
$ git submodule update --init
|
20
|
-
Submodule 'discount' (git
|
20
|
+
Submodule 'discount' (git@github.com:Orc/discount.git) registered for path 'discount'
|
21
21
|
Cloning into discount...
|
22
22
|
$ cd discount
|
23
23
|
$ ./configure.sh
|
@@ -100,7 +100,7 @@ And don't forget to rerun the preexisting tests.
|
|
100
100
|
|
101
101
|
Update the CHANGELOG.
|
102
102
|
|
103
|
-
Update rdiscount.gemspec with the new RDiscount version number
|
103
|
+
Update rdiscount.gemspec with the new RDiscount version number.
|
104
104
|
Also update the VERSION constant in lib/rdiscount.rb.
|
105
105
|
Push that change as the final commit with a message in the format
|
106
106
|
"2.0.7 release".
|
data/ext/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.7d
|
data/ext/generate.c
CHANGED
@@ -757,22 +757,29 @@ linkylinky(int image, MMIOT *f)
|
|
757
757
|
else {
|
758
758
|
int goodlink, implicit_mark = mmiottell(f);
|
759
759
|
|
760
|
-
if (
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
760
|
+
if ( is_flag_set(f->flags, MKD_EXTRA_FOOTNOTE)
|
761
|
+
&& !is_flag_set(f->flags, MKD_STRICT)
|
762
|
+
&& (!image)
|
763
|
+
&& S(name)
|
764
|
+
&& T(name)[0] == '^' ) {
|
765
|
+
extra_footnote = 1;
|
766
|
+
goodlink = 1;
|
766
767
|
}
|
767
768
|
else {
|
768
|
-
|
769
|
-
|
770
|
-
*/
|
771
|
-
mmiotseek(f, implicit_mark);
|
772
|
-
goodlink = !is_flag_set(f->flags, MKD_1_COMPAT);
|
769
|
+
if ( isspace(peek(f,1)) )
|
770
|
+
pull(f);
|
773
771
|
|
774
|
-
if (
|
775
|
-
|
772
|
+
if ( peek(f,1) == '[' ) {
|
773
|
+
pull(f); /* consume leading '[' */
|
774
|
+
goodlink = linkylabel(f, &key.tag);
|
775
|
+
}
|
776
|
+
else {
|
777
|
+
/* new markdown implicit name syntax doesn't
|
778
|
+
* require a second []
|
779
|
+
*/
|
780
|
+
mmiotseek(f, implicit_mark);
|
781
|
+
goodlink = !is_flag_set(f->flags, MKD_1_COMPAT);
|
782
|
+
}
|
776
783
|
}
|
777
784
|
|
778
785
|
if ( goodlink ) {
|
data/ext/rdiscount.c
CHANGED
@@ -18,6 +18,7 @@ typedef struct {
|
|
18
18
|
* - MKD_FENCEDCODE: Always set. (For compatibility with RDiscount 2.1.8 and earlier.)
|
19
19
|
* - MKD_GITHUBTAGS: Always set. (For compatibility with RDiscount 2.1.8 and earlier.)
|
20
20
|
* - MKD_NOPANTS: Set unless the "smart" accessor returns true.
|
21
|
+
* - MKD_NOSTYLE: Set unless the "filter_styles" accessor returns true.
|
21
22
|
*
|
22
23
|
* See rb_rdiscount__get_flags() for the detailed implementation.
|
23
24
|
*/
|
@@ -53,6 +54,11 @@ int rb_rdiscount__get_flags(VALUE ruby_obj)
|
|
53
54
|
if ( rb_funcall(ruby_obj, rb_intern("smart"), 0) != Qtrue ) {
|
54
55
|
flags = flags | MKD_NOPANTS;
|
55
56
|
}
|
57
|
+
|
58
|
+
/* The "filter_styles" accessor turns OFF the MKD_NOSTYLE flag. */
|
59
|
+
if ( rb_funcall(ruby_obj, rb_intern("filter_styles"), 0) != Qtrue ) {
|
60
|
+
flags = flags | MKD_NOSTYLE;
|
61
|
+
}
|
56
62
|
|
57
63
|
/* Handle standard flags declared in ACCESSOR_2_FLAG */
|
58
64
|
for ( entry = ACCESSOR_2_FLAG; entry->accessor_name; entry++ ) {
|
data/ext/ruby-config.h
ADDED
data/lib/rdiscount.rb
CHANGED
data/rdiscount.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'rdiscount'
|
3
|
-
s.version = '2.2.7'
|
3
|
+
s.version = '2.2.7.2'
|
4
4
|
s.summary = "Fast Implementation of Gruber's Markdown in C"
|
5
5
|
s.email = 'david@dafoster.net'
|
6
6
|
s.homepage = 'http://dafoster.net/projects/rdiscount/'
|
@@ -14,12 +14,13 @@ Gem::Specification.new do |s|
|
|
14
14
|
Rakefile
|
15
15
|
bin/rdiscount
|
16
16
|
discount
|
17
|
+
ext/Csio.c
|
18
|
+
ext/VERSION
|
17
19
|
ext/amalloc.c
|
18
20
|
ext/amalloc.h
|
19
21
|
ext/basename.c
|
20
22
|
ext/blocktags
|
21
23
|
ext/config.h
|
22
|
-
ext/Csio.c
|
23
24
|
ext/css.c
|
24
25
|
ext/cstring.h
|
25
26
|
ext/docheader.c
|
@@ -43,11 +44,11 @@ Gem::Specification.new do |s|
|
|
43
44
|
ext/pgm_options.h
|
44
45
|
ext/rdiscount.c
|
45
46
|
ext/resource.c
|
47
|
+
ext/ruby-config.h
|
46
48
|
ext/setup.c
|
47
49
|
ext/tags.c
|
48
50
|
ext/tags.h
|
49
51
|
ext/toc.c
|
50
|
-
ext/VERSION
|
51
52
|
ext/version.c
|
52
53
|
ext/xml.c
|
53
54
|
ext/xmlpage.c
|
data/test/rdiscount_test.rb
CHANGED
@@ -183,10 +183,25 @@ EOS
|
|
183
183
|
end
|
184
184
|
|
185
185
|
def test_that_style_tag_is_not_filtered_by_default
|
186
|
-
rd = RDiscount.new(
|
187
|
-
|
186
|
+
rd = RDiscount.new(<<EOS)
|
187
|
+
Hello
|
188
|
+
<style>
|
189
|
+
p { margin: 5px; }
|
190
|
+
</style>
|
191
|
+
EOS
|
192
|
+
assert_equal "<p>Hello</p>\n\n<style>\np { margin: 5px; }\n</style>\n\n", rd.to_html
|
188
193
|
end
|
189
194
|
|
195
|
+
def test_that_style_tag_is_filtered_with_flag
|
196
|
+
rd = RDiscount.new(<<EOS, :filter_styles)
|
197
|
+
Hello
|
198
|
+
<style>
|
199
|
+
p { margin: 5px; }
|
200
|
+
</style>
|
201
|
+
EOS
|
202
|
+
assert_equal "<p>Hello</p>\n\n\n", rd.to_html
|
203
|
+
end
|
204
|
+
|
190
205
|
def test_that_tables_can_have_leading_and_trailing_pipes
|
191
206
|
rd = RDiscount.new(<<EOS)
|
192
207
|
| A | B |
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdiscount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.7
|
4
|
+
version: 2.2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Tomayko
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2023-12-19 00:00:00.000000000 Z
|
16
16
|
dependencies: []
|
17
17
|
description:
|
18
18
|
email: david@dafoster.net
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- ext/pgm_options.h
|
59
59
|
- ext/rdiscount.c
|
60
60
|
- ext/resource.c
|
61
|
+
- ext/ruby-config.h
|
61
62
|
- ext/setup.c
|
62
63
|
- ext/tags.c
|
63
64
|
- ext/tags.h
|