Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRLF regression with fenced code #71

Closed
btrask opened this issue Aug 8, 2015 · 6 comments
Closed

CRLF regression with fenced code #71

btrask opened this issue Aug 8, 2015 · 6 comments

Comments

@btrask
Copy link
Contributor

btrask commented Aug 8, 2015

Thank you for making quick work of #68, but I'm afraid that's not the end of it.

Example input:

```
test
```

Output:

<pre><code>test
```</code></pre>

This happens with or without the --hardbreaks option.

@jgm
Copy link
Member

jgm commented Aug 8, 2015

Can't reproduce.

% perl -pe 's/\n/\r\n/g' | ./cmark
```
test
```
^D
<pre><code>test
</code></pre>

@jgm
Copy link
Member

jgm commented Aug 8, 2015

Did your input have no line ending character (cr, lf, crlf) after the final line?
With that I can reproduce.
That's because the close-fence scanner is looking for a final line ending character.
There used to be some code that added a line ending character to a line if none was present; I assume that's what got messed up in the last batch of changes.

@jgm jgm closed this as completed in a4f61e8 Aug 8, 2015
@btrask
Copy link
Contributor Author

btrask commented Aug 8, 2015

Oh, you're right. Sorry for jumping to conclusions!

I briefly tested a few other things and I didn't find any other problems. Thank you!

@jgm
Copy link
Member

jgm commented Aug 8, 2015

I found two more issues by modifying line endings in the
test suite. See #73.

+++ Ben Trask [Aug 08 15 13:31 ]:

Oh, you're right. Sorry for jumping to conclusions!

I briefly tested a few other things and I didn't find any other
problems. Thank you!


Reply to this email directly or [1]view it on GitHub.

References

  1. CRLF regression with fenced code #71 (comment)

@jgm
Copy link
Member

jgm commented Aug 8, 2015

See also #72.

@btrask
Copy link
Contributor Author

btrask commented Aug 9, 2015

Great work! Thanks for making line endings a priority. :)

PKRoma pushed a commit to PKRoma/cmark that referenced this issue Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants