dtext_rb 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dtext_rb.gemspec +2 -2
- data/ext/dtext/dtext.c +3 -3
- data/ext/dtext/dtext.rl +4 -4
- data/test/dtext_test.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6716ab4daccf93899c98066494d8bda0cc829af5
|
4
|
+
data.tar.gz: 894e84ba1dac5936957ae8a72fcfcfe174aefc7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52968e58a81c1c96c690704fc7d58a6f3fe2ada3fe096323f9568ade426702bf1699c955bc137e78f022db668d67acbac243dc42afc5709e96b087030f892ee
|
7
|
+
data.tar.gz: d89e6a21afd2df5a529fbf3a9c0b36d8a0f9240ad7f4003d1ed2ce672c68f1e0f0ed0df9b86ea2203ea9f0216c2448abe803d759c2a24ec3d6f6c91d03b932be
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.4
|
data/dtext_rb.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: dtext_rb 1.0.
|
5
|
+
# stub: dtext_rb 1.0.4 ruby lib
|
6
6
|
# stub: ext/dtext/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "dtext_rb"
|
10
|
-
s.version = "1.0.
|
10
|
+
s.version = "1.0.4"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
data/ext/dtext/dtext.c
CHANGED
@@ -152,9 +152,9 @@ static inline void append_c_html_escaped(StateMachine * sm, char s) {
|
|
152
152
|
sm->output = g_string_append(sm->output, "&");
|
153
153
|
break;
|
154
154
|
|
155
|
-
|
156
|
-
|
157
|
-
|
155
|
+
case '"':
|
156
|
+
sm->output = g_string_append(sm->output, """);
|
157
|
+
break;
|
158
158
|
|
159
159
|
default:
|
160
160
|
sm->output = g_string_append_c(sm->output, s);
|
data/ext/dtext/dtext.rl
CHANGED
@@ -884,7 +884,7 @@ main := |*
|
|
884
884
|
dstack_push(sm, &BLOCK_EXPAND);
|
885
885
|
append_block(sm, "<div class=\"expandable\"><div class=\"expandable-header\">");
|
886
886
|
append(sm, true, "<span>");
|
887
|
-
append_segment_html_escaped(sm, sm->a1, sm->a2 -
|
887
|
+
append_segment_html_escaped(sm, sm->a1, sm->a2 - 2);
|
888
888
|
append(sm, true, "</span>");
|
889
889
|
append_block(sm, "<input type=\"button\" value=\"Show\" class=\"expandable-button\"/></div>");
|
890
890
|
append_block(sm, "<div class=\"expandable-content\">");
|
@@ -1026,9 +1026,9 @@ static inline void append_c_html_escaped(StateMachine * sm, char s) {
|
|
1026
1026
|
sm->output = g_string_append(sm->output, "&");
|
1027
1027
|
break;
|
1028
1028
|
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1029
|
+
case '"':
|
1030
|
+
sm->output = g_string_append(sm->output, """);
|
1031
|
+
break;
|
1032
1032
|
|
1033
1033
|
default:
|
1034
1034
|
sm->output = g_string_append_c(sm->output, s);
|
data/test/dtext_test.rb
CHANGED
@@ -188,7 +188,6 @@ class DTextTest < Minitest::Test
|
|
188
188
|
|
189
189
|
def test_complex_links_1
|
190
190
|
assert_parse("<p><a href=\"/wiki_pages/show_or_new?title=1\">2 3</a> | <a href=\"/wiki_pages/show_or_new?title=4\">5 6</a></p>", "[[1|2 3]] | [[4|5 6]]")
|
191
|
-
assert_parse("", "[[chaos_(dff)|Chaos]]")
|
192
191
|
end
|
193
192
|
|
194
193
|
def test_complex_links_2
|