aboutsummaryrefslogtreecommitdiffstats
path: root/tests/link_reference.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-05 13:49:56 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-05 13:55:56 +0200
commit55a6f8560cf88b655f49f1a1a59f6c1dc6afe022 (patch)
treec53e38ee36c72292cedccaebdfce1a6beddeaf6c /tests/link_reference.rs
parentf2d62d446a7b1e03ef14b580e2aca0fad8aa23ef (diff)
downloadmarkdown-rs-55a6f8560cf88b655f49f1a1a59f6c1dc6afe022.tar.gz
markdown-rs-55a6f8560cf88b655f49f1a1a59f6c1dc6afe022.tar.bz2
markdown-rs-55a6f8560cf88b655f49f1a1a59f6c1dc6afe022.zip
Fix resizing attention bug
Diffstat (limited to '')
-rw-r--r--tests/link_reference.rs68
1 files changed, 33 insertions, 35 deletions
diff --git a/tests/link_reference.rs b/tests/link_reference.rs
index 3a0be9f..b53b99b 100644
--- a/tests/link_reference.rs
+++ b/tests/link_reference.rs
@@ -27,12 +27,11 @@ fn link_reference() {
"should support escaped brackets in link references"
);
- // To do: link/attention interplay.
- // assert_eq!(
- // micromark("[ref]: /uri\n\n[link *foo **bar** `#`*][ref]"),
- // "<p><a href=\"/uri\">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>",
- // "should support content in link references"
- // );
+ assert_eq!(
+ micromark("[ref]: /uri\n\n[link *foo **bar** `#`*][ref]"),
+ "<p><a href=\"/uri\">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>",
+ "should support content in link references"
+ );
assert_eq!(
micromark("[ref]: /uri\n\n[![moon](moon.jpg)][ref]"),
@@ -336,35 +335,34 @@ fn link_reference() {
"should not support mismatched character references in fulls"
);
- // To do: link/attention interplay.
- // assert_eq!(
- // micromark(
- // "[*f*][]
- // [&semi;][]
- // [\\;][]
- // [;][]
- // [*f*&semi;][]
- // [*f*\\;][]
- // [*f*;][]
-
- // [*f*]: alpha
- // [&semi;]: bravo
- // [\\;]: charlie
- // [;]: delta
- // [*f*&semi;]: echo
- // [*f*\\;]: foxtrot
- // [*f*;]: golf"
- // ),
- // "<p><a href=\"alpha\"><em>f</em></a>
- // <a href=\"bravo\">;</a>
- // <a href=\"charlie\">;</a>
- // <a href=\"delta\">;</a>
- // <a href=\"echo\"><em>f</em>;</a>
- // <a href=\"foxtrot\"><em>f</em>;</a>
- // <a href=\"golf\"><em>f</em>;</a></p>
- // ",
- // "should properly handle labels w/ character references and -escapes, and phrasing"
- // );
+ assert_eq!(
+ micromark(
+ "[*f*][]
+[&semi;][]
+[\\;][]
+[;][]
+[*f*&semi;][]
+[*f*\\;][]
+[*f*;][]
+
+[*f*]: alpha
+[&semi;]: bravo
+[\\;]: charlie
+[;]: delta
+[*f*&semi;]: echo
+[*f*\\;]: foxtrot
+[*f*;]: golf"
+ ),
+ "<p><a href=\"alpha\"><em>f</em></a>
+<a href=\"bravo\">;</a>
+<a href=\"charlie\">;</a>
+<a href=\"delta\">;</a>
+<a href=\"echo\"><em>f</em>;</a>
+<a href=\"foxtrot\"><em>f</em>;</a>
+<a href=\"golf\"><em>f</em>;</a></p>
+",
+ "should properly handle labels w/ character references and -escapes, and phrasing"
+ );
// 999 `x` characters.
let max = "x".repeat(999);