Skip to content

Commit

Permalink
Merge pull request #877 from notriddle/link-title-break
Browse files Browse the repository at this point in the history
Eat all spaces after line break in link title
  • Loading branch information
Martin1887 committed Apr 16, 2024
2 parents 912405c + e589720 commit 6165d35
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pulldown-cmark/specs/regression.txt
Expand Up @@ -2542,3 +2542,15 @@ ISSUE 861
.
<pre><code></code></pre>
````````````````````````````````

ISSUE 867

```````````````````````````````` example
[link]: destination "
text "

[link]
.
<p><a href="destination" title="
text ">link</a></p>
````````````````````````````````
1 change: 1 addition & 0 deletions pulldown-cmark/src/firstpass.rs
Expand Up @@ -1634,6 +1634,7 @@ impl<'a, 'b> FirstPass<'a, 'b> {
return None;
}
}
line_start.scan_all_space();
bytecount += line_start.bytes_scanned();
linestart = bytecount;
if scan_blank_line(&bytes[bytecount..]).is_some() {
Expand Down
14 changes: 14 additions & 0 deletions pulldown-cmark/tests/suite/regression.rs
Expand Up @@ -3039,3 +3039,17 @@ fn regression_test_192() {

test_markdown_html(original, expected, false, false, false);
}

#[test]
fn regression_test_193() {
let original = r##"[link]: destination "
text "
[link]
"##;
let expected = r##"<p><a href="destination" title="
text ">link</a></p>
"##;

test_markdown_html(original, expected, false, false, false);
}

0 comments on commit 6165d35

Please sign in to comment.