rdiscount_wm 3.0.0.0 → 3.1.0.0
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.
- checksums.yaml +4 -4
- data/Rakefile +7 -7
- data/ext/generate.c +21 -2
- data/rdiscount_wm.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4847b1f3a2cfc6519e0cc1311f704233cd703c29
|
|
4
|
+
data.tar.gz: 87e6b19e5c6e9ba37569ce231ff1c1793d19e7b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4112ea418cf3af75dcd61914539999e3beea32f84c426443e87750d55df510ca17b83d5b740236c0212414b0f427692f02a90abf292e7263e829008f9960ce6
|
|
7
|
+
data.tar.gz: 44c52ccc6e1a05b63a6ed2bb158cd6c70a98064f06bac84271f4e7455b2cee3b15b26d4da8eeda02fe59a7481ba905c05b2d678a53525625b61ba145a6b7654b
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ task :default => :test
|
|
|
8
8
|
# Ruby Extension
|
|
9
9
|
# ==========================================================
|
|
10
10
|
|
|
11
|
-
DLEXT =
|
|
11
|
+
DLEXT = RbConfig::MAKEFILE_CONFIG['DLEXT']
|
|
12
12
|
RUBYDIGEST = Digest::MD5.hexdigest(`ruby --version`)
|
|
13
13
|
|
|
14
14
|
file "ext/ruby-#{RUBYDIGEST}" do |f|
|
|
@@ -171,10 +171,10 @@ end
|
|
|
171
171
|
# PACKAGING =================================================================
|
|
172
172
|
|
|
173
173
|
require 'rubygems'
|
|
174
|
-
$spec = eval(File.read('
|
|
174
|
+
$spec = eval(File.read('rdiscount_wm.gemspec'))
|
|
175
175
|
|
|
176
176
|
def package(ext='')
|
|
177
|
-
"pkg/
|
|
177
|
+
"pkg/rdiscount_wm-#{$spec.version}" + ext
|
|
178
178
|
end
|
|
179
179
|
|
|
180
180
|
desc 'Build packages'
|
|
@@ -187,8 +187,8 @@ end
|
|
|
187
187
|
|
|
188
188
|
directory 'pkg/'
|
|
189
189
|
|
|
190
|
-
file package('.gem') => %w[pkg/
|
|
191
|
-
sh "gem build
|
|
190
|
+
file package('.gem') => %w[pkg/ rdiscount_wm.gemspec] + $spec.files do |f|
|
|
191
|
+
sh "gem build rdiscount_wm.gemspec"
|
|
192
192
|
mv File.basename(f.name), f.name
|
|
193
193
|
end
|
|
194
194
|
|
|
@@ -199,11 +199,11 @@ end
|
|
|
199
199
|
# GEMSPEC HELPERS ==========================================================
|
|
200
200
|
|
|
201
201
|
def source_version
|
|
202
|
-
line = File.read('lib/
|
|
202
|
+
line = File.read('lib/rdiscount_wm.rb')[/^\s*VERSION = .*/]
|
|
203
203
|
line.match(/.*VERSION = '(.*)'/)[1]
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
-
file '
|
|
206
|
+
file 'rdiscount_wm.gemspec' => FileList['Rakefile','lib/rdiscount_wm.rb'] do |f|
|
|
207
207
|
# read spec file and split out manifest section
|
|
208
208
|
spec = File.read(f.name)
|
|
209
209
|
head, manifest, tail = spec.split(" # = MANIFEST =\n")
|
data/ext/generate.c
CHANGED
|
@@ -845,7 +845,6 @@ code(MMIOT *f, char *s, int length)
|
|
|
845
845
|
cputc(c, f);
|
|
846
846
|
} /* code */
|
|
847
847
|
|
|
848
|
-
|
|
849
848
|
/* delspan() -- write out a chunk of text, blocking with <del>...</del>
|
|
850
849
|
*/
|
|
851
850
|
static void
|
|
@@ -1191,6 +1190,21 @@ smartypants(int c, int *flags, MMIOT *f)
|
|
|
1191
1190
|
return 0;
|
|
1192
1191
|
} /* smartypants */
|
|
1193
1192
|
|
|
1193
|
+
/* process latex with \(, \) delimiters
|
|
1194
|
+
*/
|
|
1195
|
+
static int
|
|
1196
|
+
mathhandler(MMIOT *f, int endtick) {
|
|
1197
|
+
int i = 0, size;
|
|
1198
|
+
|
|
1199
|
+
while(peek(f, ++i) != EOF)
|
|
1200
|
+
if (peek(f, i) == '\\' && peek(f, i+1) == endtick) {
|
|
1201
|
+
Qstring("\\(", f);
|
|
1202
|
+
while(i-->-1) cputc(pull(f), f);
|
|
1203
|
+
return 1;
|
|
1204
|
+
}
|
|
1205
|
+
return 0;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1194
1208
|
|
|
1195
1209
|
/* process a body of text encased in some sort of tick marks. If it
|
|
1196
1210
|
* works, generate the output and return 1, otherwise just return 0 and
|
|
@@ -1266,6 +1280,7 @@ text(MMIOT *f)
|
|
|
1266
1280
|
else
|
|
1267
1281
|
Qchar(c, f);
|
|
1268
1282
|
break;
|
|
1283
|
+
|
|
1269
1284
|
case '[': if ( tag_text(f) || !linkylinky(0, f) )
|
|
1270
1285
|
Qchar(c, f);
|
|
1271
1286
|
break;
|
|
@@ -1369,7 +1384,11 @@ text(MMIOT *f)
|
|
|
1369
1384
|
|
|
1370
1385
|
case EOF: Qchar('\\', f);
|
|
1371
1386
|
break;
|
|
1372
|
-
|
|
1387
|
+
|
|
1388
|
+
case '(':
|
|
1389
|
+
if ( mathhandler(f, ')') )
|
|
1390
|
+
break;
|
|
1391
|
+
|
|
1373
1392
|
default: if ( escaped(f,c) ||
|
|
1374
1393
|
strchr(">#.-+{}]![*_\\()`", c) )
|
|
1375
1394
|
Qchar(c, f);
|
data/rdiscount_wm.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rdiscount_wm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Tomayko
|
|
@@ -81,17 +81,17 @@ require_paths:
|
|
|
81
81
|
- lib
|
|
82
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
requirements:
|
|
84
|
-
- -
|
|
84
|
+
- - "!="
|
|
85
85
|
- !ruby/object:Gem::Version
|
|
86
86
|
version: 1.9.2
|
|
87
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
requirements:
|
|
89
|
-
- -
|
|
89
|
+
- - ">="
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
91
|
version: '0'
|
|
92
92
|
requirements: []
|
|
93
93
|
rubyforge_project: wink
|
|
94
|
-
rubygems_version: 2.
|
|
94
|
+
rubygems_version: 2.2.2
|
|
95
95
|
signing_key:
|
|
96
96
|
specification_version: 4
|
|
97
97
|
summary: Fast Implementation of Gruber's Markdown in C With Math(LaTex, MathJax) Support
|