wikitext 1.10 → 1.10.1

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/parser.c CHANGED
@@ -287,9 +287,12 @@ void wiki_append_hyperlink(parser_t *parser, VALUE link_prefix, str_t *link_targ
287
287
 
288
288
  // special handling for mailto URIs
289
289
  const char *mailto = "mailto:";
290
- if (NIL_P(link_prefix) &&
291
- link_target->len >= (long)sizeof(mailto) &&
292
- strncmp(mailto, link_target->ptr, sizeof(mailto)) == 0)
290
+ long mailto_len = (long)sizeof(mailto) - 1; // don't count NUL byte
291
+ if ((link_target->len >= mailto_len &&
292
+ strncmp(mailto, link_target->ptr, mailto_len) == 0) ||
293
+ (!NIL_P(link_prefix) &&
294
+ RSTRING_LEN(link_prefix) >= mailto_len &&
295
+ strncmp(mailto, RSTRING_PTR(link_prefix), mailto_len) == 0))
293
296
  link_class = parser->mailto_class; // use mailto_class from parser
294
297
  if (link_class != Qnil)
295
298
  {
data/ext/wikitext_ragel.c CHANGED
@@ -193,7 +193,7 @@ tr22:
193
193
  }}
194
194
  goto st106;
195
195
  tr23:
196
- #line 1 "wikitext_ragel.rl"
196
+ #line 1 "NONE"
197
197
  { switch( act ) {
198
198
  case 21:
199
199
  {{p = ((te))-1;}
@@ -676,12 +676,12 @@ tr212:
676
676
  }}
677
677
  goto st106;
678
678
  st106:
679
- #line 1 "wikitext_ragel.rl"
679
+ #line 1 "NONE"
680
680
  {ts = 0;}
681
681
  if ( ++p == pe )
682
682
  goto _test_eof106;
683
683
  case 106:
684
- #line 1 "wikitext_ragel.rl"
684
+ #line 1 "NONE"
685
685
  {ts = p;}
686
686
  #line 687 "wikitext_ragel.c"
687
687
  switch( (*p) ) {
@@ -857,7 +857,7 @@ case 110:
857
857
  goto st110;
858
858
  goto tr155;
859
859
  tr130:
860
- #line 1 "wikitext_ragel.rl"
860
+ #line 1 "NONE"
861
861
  {te = p+1;}
862
862
  goto st111;
863
863
  st111:
@@ -1092,7 +1092,7 @@ case 115:
1092
1092
  goto tr164;
1093
1093
  goto tr160;
1094
1094
  tr133:
1095
- #line 1 "wikitext_ragel.rl"
1095
+ #line 1 "NONE"
1096
1096
  {te = p+1;}
1097
1097
  #line 454 "wikitext_ragel.rl"
1098
1098
  {act = 45;}
@@ -1201,7 +1201,7 @@ case 24:
1201
1201
  goto tr29;
1202
1202
  goto tr23;
1203
1203
  tr29:
1204
- #line 1 "wikitext_ragel.rl"
1204
+ #line 1 "NONE"
1205
1205
  {te = p+1;}
1206
1206
  #line 303 "wikitext_ragel.rl"
1207
1207
  {act = 22;}
@@ -1223,7 +1223,7 @@ case 117:
1223
1223
  goto tr167;
1224
1224
  goto tr166;
1225
1225
  tr167:
1226
- #line 1 "wikitext_ragel.rl"
1226
+ #line 1 "NONE"
1227
1227
  {te = p+1;}
1228
1228
  #line 303 "wikitext_ragel.rl"
1229
1229
  {act = 22;}
@@ -1245,7 +1245,7 @@ case 118:
1245
1245
  goto tr168;
1246
1246
  goto tr166;
1247
1247
  tr168:
1248
- #line 1 "wikitext_ragel.rl"
1248
+ #line 1 "NONE"
1249
1249
  {te = p+1;}
1250
1250
  #line 303 "wikitext_ragel.rl"
1251
1251
  {act = 22;}
@@ -1267,7 +1267,7 @@ case 119:
1267
1267
  goto tr169;
1268
1268
  goto tr166;
1269
1269
  tr169:
1270
- #line 1 "wikitext_ragel.rl"
1270
+ #line 1 "NONE"
1271
1271
  {te = p+1;}
1272
1272
  #line 303 "wikitext_ragel.rl"
1273
1273
  {act = 22;}
@@ -1289,7 +1289,7 @@ case 120:
1289
1289
  goto st22;
1290
1290
  goto tr166;
1291
1291
  tr165:
1292
- #line 1 "wikitext_ragel.rl"
1292
+ #line 1 "NONE"
1293
1293
  {te = p+1;}
1294
1294
  #line 454 "wikitext_ragel.rl"
1295
1295
  {act = 45;}
@@ -1323,7 +1323,7 @@ case 121:
1323
1323
  goto st22;
1324
1324
  goto tr155;
1325
1325
  tr134:
1326
- #line 1 "wikitext_ragel.rl"
1326
+ #line 1 "NONE"
1327
1327
  {te = p+1;}
1328
1328
  #line 436 "wikitext_ragel.rl"
1329
1329
  {act = 43;}
@@ -1445,7 +1445,7 @@ case 126:
1445
1445
  goto st125;
1446
1446
  goto tr170;
1447
1447
  tr136:
1448
- #line 1 "wikitext_ragel.rl"
1448
+ #line 1 "NONE"
1449
1449
  {te = p+1;}
1450
1450
  #line 442 "wikitext_ragel.rl"
1451
1451
  {act = 44;}
@@ -1472,7 +1472,7 @@ case 127:
1472
1472
  goto tr136;
1473
1473
  goto tr174;
1474
1474
  tr137:
1475
- #line 1 "wikitext_ragel.rl"
1475
+ #line 1 "NONE"
1476
1476
  {te = p+1;}
1477
1477
  goto st128;
1478
1478
  st128:
@@ -2149,7 +2149,7 @@ case 131:
2149
2149
  goto tr187;
2150
2150
  goto tr186;
2151
2151
  tr140:
2152
- #line 1 "wikitext_ragel.rl"
2152
+ #line 1 "NONE"
2153
2153
  {te = p+1;}
2154
2154
  #line 442 "wikitext_ragel.rl"
2155
2155
  {act = 44;}
@@ -2178,7 +2178,7 @@ case 132:
2178
2178
  goto tr136;
2179
2179
  goto tr174;
2180
2180
  tr188:
2181
- #line 1 "wikitext_ragel.rl"
2181
+ #line 1 "NONE"
2182
2182
  {te = p+1;}
2183
2183
  #line 442 "wikitext_ragel.rl"
2184
2184
  {act = 44;}
@@ -2207,7 +2207,7 @@ case 133:
2207
2207
  goto tr136;
2208
2208
  goto tr174;
2209
2209
  tr189:
2210
- #line 1 "wikitext_ragel.rl"
2210
+ #line 1 "NONE"
2211
2211
  {te = p+1;}
2212
2212
  #line 442 "wikitext_ragel.rl"
2213
2213
  {act = 44;}
@@ -2274,7 +2274,7 @@ case 98:
2274
2274
  goto tr110;
2275
2275
  goto tr107;
2276
2276
  tr110:
2277
- #line 1 "wikitext_ragel.rl"
2277
+ #line 1 "NONE"
2278
2278
  {te = p+1;}
2279
2279
  goto st135;
2280
2280
  st135:
@@ -2331,7 +2331,7 @@ case 99:
2331
2331
  goto st99;
2332
2332
  goto tr111;
2333
2333
  tr141:
2334
- #line 1 "wikitext_ragel.rl"
2334
+ #line 1 "NONE"
2335
2335
  {te = p+1;}
2336
2336
  #line 442 "wikitext_ragel.rl"
2337
2337
  {act = 44;}
@@ -2360,7 +2360,7 @@ case 136:
2360
2360
  goto tr136;
2361
2361
  goto tr174;
2362
2362
  tr192:
2363
- #line 1 "wikitext_ragel.rl"
2363
+ #line 1 "NONE"
2364
2364
  {te = p+1;}
2365
2365
  #line 442 "wikitext_ragel.rl"
2366
2366
  {act = 44;}
@@ -2389,7 +2389,7 @@ case 137:
2389
2389
  goto tr136;
2390
2390
  goto tr174;
2391
2391
  tr193:
2392
- #line 1 "wikitext_ragel.rl"
2392
+ #line 1 "NONE"
2393
2393
  {te = p+1;}
2394
2394
  #line 442 "wikitext_ragel.rl"
2395
2395
  {act = 44;}
@@ -2418,7 +2418,7 @@ case 138:
2418
2418
  goto tr136;
2419
2419
  goto tr174;
2420
2420
  tr194:
2421
- #line 1 "wikitext_ragel.rl"
2421
+ #line 1 "NONE"
2422
2422
  {te = p+1;}
2423
2423
  #line 442 "wikitext_ragel.rl"
2424
2424
  {act = 44;}
@@ -2448,7 +2448,7 @@ case 139:
2448
2448
  goto tr136;
2449
2449
  goto tr174;
2450
2450
  tr142:
2451
- #line 1 "wikitext_ragel.rl"
2451
+ #line 1 "NONE"
2452
2452
  {te = p+1;}
2453
2453
  #line 442 "wikitext_ragel.rl"
2454
2454
  {act = 44;}
@@ -2477,7 +2477,7 @@ case 140:
2477
2477
  goto tr136;
2478
2478
  goto tr174;
2479
2479
  tr195:
2480
- #line 1 "wikitext_ragel.rl"
2480
+ #line 1 "NONE"
2481
2481
  {te = p+1;}
2482
2482
  #line 442 "wikitext_ragel.rl"
2483
2483
  {act = 44;}
@@ -2506,7 +2506,7 @@ case 141:
2506
2506
  goto tr136;
2507
2507
  goto tr174;
2508
2508
  tr196:
2509
- #line 1 "wikitext_ragel.rl"
2509
+ #line 1 "NONE"
2510
2510
  {te = p+1;}
2511
2511
  #line 442 "wikitext_ragel.rl"
2512
2512
  {act = 44;}
@@ -2535,7 +2535,7 @@ case 142:
2535
2535
  goto tr136;
2536
2536
  goto tr174;
2537
2537
  tr197:
2538
- #line 1 "wikitext_ragel.rl"
2538
+ #line 1 "NONE"
2539
2539
  {te = p+1;}
2540
2540
  #line 442 "wikitext_ragel.rl"
2541
2541
  {act = 44;}
@@ -2564,7 +2564,7 @@ case 143:
2564
2564
  goto tr136;
2565
2565
  goto tr174;
2566
2566
  tr198:
2567
- #line 1 "wikitext_ragel.rl"
2567
+ #line 1 "NONE"
2568
2568
  {te = p+1;}
2569
2569
  #line 442 "wikitext_ragel.rl"
2570
2570
  {act = 44;}
@@ -2593,7 +2593,7 @@ case 144:
2593
2593
  goto tr136;
2594
2594
  goto tr174;
2595
2595
  tr199:
2596
- #line 1 "wikitext_ragel.rl"
2596
+ #line 1 "NONE"
2597
2597
  {te = p+1;}
2598
2598
  #line 442 "wikitext_ragel.rl"
2599
2599
  {act = 44;}
@@ -2715,7 +2715,7 @@ case 105:
2715
2715
  goto tr118;
2716
2716
  goto tr23;
2717
2717
  tr118:
2718
- #line 1 "wikitext_ragel.rl"
2718
+ #line 1 "NONE"
2719
2719
  {te = p+1;}
2720
2720
  #line 297 "wikitext_ragel.rl"
2721
2721
  {act = 21;}
@@ -2737,7 +2737,7 @@ case 146:
2737
2737
  goto tr201;
2738
2738
  goto tr191;
2739
2739
  tr201:
2740
- #line 1 "wikitext_ragel.rl"
2740
+ #line 1 "NONE"
2741
2741
  {te = p+1;}
2742
2742
  #line 297 "wikitext_ragel.rl"
2743
2743
  {act = 21;}
@@ -2759,7 +2759,7 @@ case 147:
2759
2759
  goto tr202;
2760
2760
  goto tr191;
2761
2761
  tr202:
2762
- #line 1 "wikitext_ragel.rl"
2762
+ #line 1 "NONE"
2763
2763
  {te = p+1;}
2764
2764
  #line 297 "wikitext_ragel.rl"
2765
2765
  {act = 21;}
@@ -2781,7 +2781,7 @@ case 148:
2781
2781
  goto tr203;
2782
2782
  goto tr191;
2783
2783
  tr203:
2784
- #line 1 "wikitext_ragel.rl"
2784
+ #line 1 "NONE"
2785
2785
  {te = p+1;}
2786
2786
  #line 297 "wikitext_ragel.rl"
2787
2787
  {act = 21;}
@@ -2803,7 +2803,7 @@ case 149:
2803
2803
  goto st103;
2804
2804
  goto tr191;
2805
2805
  tr143:
2806
- #line 1 "wikitext_ragel.rl"
2806
+ #line 1 "NONE"
2807
2807
  {te = p+1;}
2808
2808
  #line 442 "wikitext_ragel.rl"
2809
2809
  {act = 44;}
@@ -2832,7 +2832,7 @@ case 150:
2832
2832
  goto tr136;
2833
2833
  goto tr174;
2834
2834
  tr204:
2835
- #line 1 "wikitext_ragel.rl"
2835
+ #line 1 "NONE"
2836
2836
  {te = p+1;}
2837
2837
  #line 442 "wikitext_ragel.rl"
2838
2838
  {act = 44;}
@@ -1,4 +1,4 @@
1
- # Copyright 2007-2009 Wincent Colaiuta. All rights reserved.
1
+ # Copyright 2007-2010 Wincent Colaiuta. All rights reserved.
2
2
  #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions are met:
@@ -22,5 +22,5 @@
22
22
  # POSSIBILITY OF SUCH DAMAGE.
23
23
 
24
24
  module Wikitext
25
- VERSION = '1.10'
25
+ VERSION = '1.10.1'
26
26
  end # module Wikitext
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikitext
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.10"
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wincent Colaiuta
@@ -9,11 +9,30 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-01 00:00:00 +01:00
12
+ date: 2010-03-21 00:00:00 +01:00
13
13
  default_executable:
14
- dependencies: []
15
-
16
- description: " Wikitext is a fast wikitext-to-HTML translator written in C.\n"
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: wopen3
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description: Wikitext is a fast wikitext-to-HTML translator written in C.
17
36
  email: win@wincent.com
18
37
  executables:
19
38
  - wikitext
@@ -77,6 +96,7 @@ files:
77
96
  - spec/strong_em_spec.rb
78
97
  - spec/strong_spec.rb
79
98
  - spec/tokenizing_spec.rb
99
+ - spec/trash
80
100
  - spec/tt_spec.rb
81
101
  - spec/ul_spec.rb
82
102
  - spec/version_spec.rb
@@ -84,8 +104,6 @@ files:
84
104
  - spec/wikitext_spec.rb
85
105
  has_rdoc: true
86
106
  homepage: http://wikitext.rubyforge.org/
87
- licenses: []
88
-
89
107
  post_install_message:
90
108
  rdoc_options: []
91
109
 
@@ -107,9 +125,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
125
  requirements: []
108
126
 
109
127
  rubyforge_project: wikitext
110
- rubygems_version: 1.3.5
128
+ rubygems_version: 1.3.1
111
129
  signing_key:
112
- specification_version: 3
130
+ specification_version: 2
113
131
  summary: Wikitext-to-HTML translator
114
132
  test_files: []
115
133