sunflower 0.5.10 → 0.5.11
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/README +1 -1
- data/lib/sunflower/core.rb +6 -1
- metadata +2 -2
data/README
CHANGED
data/lib/sunflower/core.rb
CHANGED
|
@@ -40,7 +40,7 @@ end
|
|
|
40
40
|
#
|
|
41
41
|
# You can use multiple Sunflowers at once, to work on multiple wikis.
|
|
42
42
|
class Sunflower
|
|
43
|
-
VERSION = '0.5.
|
|
43
|
+
VERSION = '0.5.11'
|
|
44
44
|
|
|
45
45
|
INVALID_CHARS = %w(# < > [ ] | { })
|
|
46
46
|
INVALID_CHARS_REGEX = Regexp.union *INVALID_CHARS
|
|
@@ -349,6 +349,11 @@ class Sunflower
|
|
|
349
349
|
|
|
350
350
|
# Cleans up underscores, percent-encoding and title-casing in title (with optional anchor).
|
|
351
351
|
def cleanup_title title, preserve_case=false, preserve_colon=false
|
|
352
|
+
# strip unicode bidi junk
|
|
353
|
+
title = title.gsub /[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/, ''
|
|
354
|
+
# strip unicode spaces
|
|
355
|
+
title = title.gsub /[\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]+/, ' '
|
|
356
|
+
|
|
352
357
|
return '' if title.strip == ''
|
|
353
358
|
|
|
354
359
|
name, anchor = title.split '#', 2
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sunflower
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.11
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-05-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: json
|