StringScanner is not multibyte-safe. Avoid like the plague.
This commit is contained in:
parent
f7bce2c773
commit
3c650f2cf6
|
@ -467,6 +467,12 @@ END_THM
|
||||||
'_should we go ThatWay or ThisWay _')
|
'_should we go ThatWay or ThisWay _')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_content_with_utf8_in_strong
|
||||||
|
assert_markup_parsed_as(
|
||||||
|
"<p>Can we handle <strong>\u221E-gerbe</strong></p>",
|
||||||
|
"Can we handle **\u221E-gerbe**")
|
||||||
|
end
|
||||||
|
|
||||||
def test_content_with_redirected_link
|
def test_content_with_redirected_link
|
||||||
assert_markup_parsed_as(
|
assert_markup_parsed_as(
|
||||||
"<p>This is a redirected link: <a class='existingWikiWord' href='../show/liquor'>" +
|
"<p>This is a redirected link: <a class='existingWikiWord' href='../show/liquor'>" +
|
||||||
|
|
|
@ -33,8 +33,9 @@ class CharSourceDebug; end
|
||||||
|
|
||||||
# Choose!
|
# Choose!
|
||||||
|
|
||||||
#CharSource = CharSourceManual # faster! 58ms vs. 65ms
|
CharSource = CharSourceManual # faster! 58ms vs. 65ms
|
||||||
CharSource = CharSourceStrscan # Seems faster on LONG documents (where we care)
|
#CharSource = CharSourceStrscan # Faster on LONG documents. But it's not multi-byte aware
|
||||||
|
# (at least in Ruby 1.9.2 and earlier), Hence unusable in Ruby 1.9.
|
||||||
#CharSource = CharSourceDebug
|
#CharSource = CharSourceDebug
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue