fix(markdown-legacy): normalize some characters for kramed's annotate function#88
Merged
azu merged 5 commits intohonkit:masterfrom Jul 5, 2020
solufa:fix/autocrlf
Merged
fix(markdown-legacy): normalize some characters for kramed's annotate function#88azu merged 5 commits intohonkit:masterfrom solufa:fix/autocrlf
azu merged 5 commits intohonkit:masterfrom
solufa:fix/autocrlf
Conversation
azu
reviewed
Jul 4, 2020
| // annotate.blocks does not normalize src, so windows fail the reason | ||
| const normalizedSource = src.replace(/\r\n|\r/g, "\n"); | ||
| var lexed = annotate.blocks(normalizedSource); | ||
| var lexed = annotate.blocks(src); |
Member
There was a problem hiding this comment.
We can not require that user should not use CRLF.
So, Its needed in parser.
I think that this is a bug of kramed.
kramed does same normalize in lexer.
https://github.com/GitbookIO/kramed/blob/9d96b7ac9e063b94d51423d8cd450f4a7c7eb1f3/lib/lex/block.js#L50-L58
But, kramed's annotate function does not it.
Member
There was a problem hiding this comment.
📝 I've noticed that we need to add other normalize into this line OR fork kramed.
Member
|
Thanks PR. I've commented |
azu
reviewed
Jul 5, 2020
.github/workflows/test.yml
Outdated
| steps: | ||
| - name: Disable autocrlf | ||
| run: git config --global core.autocrlf false | ||
| if: matrix.os == 'windows-latest' |
Member
There was a problem hiding this comment.
Can you remove this?
We want to use default config.
Contributor
Author
|
Thanks for the comments. Sorry for the many commits. |
Member
|
@solufa No problem! Thanks for PR |
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.
fix: #85 (comment)