Do not accept footnote definitions with line breaks#761
Merged
Martin1887 merged 2 commits intopulldown-cmark:masterfrom Oct 31, 2023
Merged
Do not accept footnote definitions with line breaks#761Martin1887 merged 2 commits intopulldown-cmark:masterfrom
Martin1887 merged 2 commits intopulldown-cmark:masterfrom
Conversation
692db16 to
b0ba377
Compare
This change brings pulldown-cmark into alignment with [markdown-it] and hugo/goldmark. It's close to GitHub, but GitHub [doesn't parse the backslashes as hard line breaks][gist]. It's odd that link reference definitions are allowed to have line breaks and footnote definitions aren't, but it's not worth it to be gratuitously different. [markdown-it]: https://markdown-it.github.io/#md3=%7B%22source%22%3A%22%5B%5Efoo%5C%5C%5Cnbar%5D%3A%20not%20a%20footnote%20definition%5Cn%5Cn%5Bbaz%5C%5C%5Cnquux%5D%3A%20https%3A%2F%2Frust-lang.org%5Cn%5Cn%5Bfirst%5Cnsecond%5D%3A%20https%3A%2F%2Frust-lang.org%5Cn%5Cn%5B%5Ethird%5Cnfourth%5D%3A%20not%20a%20footnote%20definition%5Cn%5Cn%5Bbaz%5C%5C%5Cnquux%5D%5Cn%5B%5Efoo%5C%5C%5Cnbar%5D%5Cn%5Bfirst%5Cnsecond%5D%5Cn%5B%5Ethird%5Cnfourth%5D%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D [gist]: https://gist.github.com/notriddle/7fd2410a2585123ad0f894b08c58b21f
b0ba377 to
736592c
Compare
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #760
This change brings pulldown-cmark into alignment with markdown-it and hugo/goldmark. It's close to GitHub, but GitHub doesn't parse the backslashes as hard line breaks.
It's odd that link reference definitions are allowed to have line breaks and footnote definitions aren't, but it's not worth it to be gratuitously different.