1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
// This file is auto-generated by the build script
// Please, do not modify it manually
use super::test_markdown_html;
#[test]
fn smart_punct_test_1() {
let original = r##""Hello," said the spider.
"'Shelob' is my name."
"##;
let expected = r##"<p>“Hello,” said the spider.
“‘Shelob’ is my name.”</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_2() {
let original = r##"'A', 'B', and 'C' are letters.
"##;
let expected = r##"<p>‘A’, ‘B’, and ‘C’ are letters.</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_3() {
let original = r##"'Oak,' 'elm,' and 'beech' are names of trees.
So is 'pine.'
"##;
let expected = r##"<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees.
So is ‘pine.’</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_4() {
let original = r##"'He said, "I want to go."'
"##;
let expected = r##"<p>‘He said, “I want to go.”’</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_5() {
let original = r##"Were you alive in the 70's?
"##;
let expected = r##"<p>Were you alive in the 70’s?</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_6() {
let original = r##"Here is some quoted '`code`' and a "[quoted link](url)".
"##;
let expected = r##"<p>Here is some quoted ‘<code>code</code>’ and a “<a href="url">quoted link</a>”.</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_7() {
let original = r##"'tis the season to be 'jolly'
"##;
let expected = r##"<p>’tis the season to be ‘jolly’</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_8() {
let original = r##"'We'll use Jane's boat and John's truck,' Jenna said.
"##;
let expected = r##"<p>‘We’ll use Jane’s boat and John’s truck,’ Jenna said.</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_9() {
let original = r##""A paragraph with no closing quote.
"Second paragraph by same speaker, in fiction."
"##;
let expected = r##"<p>“A paragraph with no closing quote.</p>
<p>“Second paragraph by same speaker, in fiction.”</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_10() {
let original = r##"[a]'s b'
"##;
let expected = r##"<p>[a]’s b’</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_11() {
let original = r##"\"This is not smart.\"
This isn\'t either.
5\'8\"
"##;
let expected = r##"<p>"This is not smart."
This isn't either.
5'8"</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_12() {
let original = r##"Some dashes: em---em
en--en
em --- em
en -- en
2--3
"##;
let expected = r##"<p>Some dashes: em—em
en–en
em — em
en – en
2–3</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_13() {
let original = r##"one-
two--
three---
four----
five-----
six------
seven-------
eight--------
nine---------
thirteen-------------.
"##;
let expected = r##"<p>one-
two–
three—
four––
five—–
six——
seven—––
eight––––
nine———
thirteen———––.</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_14() {
let original = r##"Escaped hyphens: \-- \-\-\-.
"##;
let expected = r##"<p>Escaped hyphens: -- ---.</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_15() {
let original = r##"Ellipses...and...and....
"##;
let expected = r##"<p>Ellipses…and…and….</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
#[test]
fn smart_punct_test_16() {
let original = r##"No ellipses\.\.\.
"##;
let expected = r##"<p>No ellipses...</p>
"##;
test_markdown_html(original, expected, true, false, false);
}
|