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

Fixed multiple ticks/tildes inside code blocks #302

Merged
merged 5 commits into from Mar 5, 2020

Conversation

fredck
Copy link
Contributor

@fredck fredck commented Feb 25, 2020

Fixes #300.

@fredck fredck changed the base branch from master to core February 25, 2020 16:50
@fredck fredck changed the base branch from core to master February 25, 2020 16:55
@martincizek
Copy link
Collaborator

I guess this should be applied only to the trailing newline:

code.replace(/^\n|\n$/g, '')

I've tested that if there is a newline after <pre><code>, then it is really rendered by the browser, i.e. it is a real part of the content and should appear as an empty line after the opening fence. It m

Correct me if I am wrong :)

@fredck
Copy link
Contributor Author

fredck commented Mar 3, 2020

@martincizek, you're totally right.

I've pushed the fix for it, including an additional test to be sure that we're preserving line breaks at the start/end of code blocks.

Copy link
Collaborator

@domchristie domchristie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all this! Just a few minor suggestions. Let me know what you think.

src/commonmark-rules.js Outdated Show resolved Hide resolved
src/commonmark-rules.js Outdated Show resolved Hide resolved
src/commonmark-rules.js Outdated Show resolved Hide resolved
fredck and others added 3 commits March 5, 2020 09:24
Co-Authored-By: Dom Christie <christiedom@gmail.com>
Co-Authored-By: Dom Christie <christiedom@gmail.com>
Co-Authored-By: Dom Christie <christiedom@gmail.com>
@fredck fredck requested a review from domchristie March 5, 2020 08:30
@fredck
Copy link
Contributor Author

fredck commented Mar 5, 2020

Thanks for the suggestions, @domchristie. I've committed all of them.

@domchristie domchristie merged commit 0b5d4d5 into mixmark-io:master Mar 5, 2020
@fredck fredck deleted the t/domchristie/turndown/300 branch March 6, 2020 14:56
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

Successfully merging this pull request may close these issues.

Triple ticks break code blocks
3 participants