-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Correct processing of backtick code block on blockquote (fix Issue#2969) #3765
Merged
curbengh
merged 2 commits into
hexojs:master
from
seaoak:feature/correct_filter_backtick_code_block_on_blockquote
Oct 14, 2019
Merged
Correct processing of backtick code block on blockquote (fix Issue#2969) #3765
curbengh
merged 2 commits into
hexojs:master
from
seaoak:feature/correct_filter_backtick_code_block_on_blockquote
Oct 14, 2019
Conversation
This file contains 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
This patch makes the filter "backtick_code_block" to remove '>' characters at the head of each line. How many '>' characters should be removed? It is decided by the number of '>' characters at the first line. This patch works well even if there are too few '>' characters at the head of a line. (Simply removes all '>' characters less than or equal to the number of '>' characters at the first lines.)
I can confirm it also works with
|
curbengh
previously approved these changes
Oct 14, 2019
This was referenced Oct 14, 2019
Merged
curbengh
approved these changes
Oct 14, 2019
SukkaW
approved these changes
Oct 14, 2019
also confirmed it works with,
|
4 tasks
Merged
2 tasks
4 tasks
seaoak
added a commit
to seaoak/hexo
that referenced
this pull request
Oct 16, 2019
Blank lines in backtick code block on blockquote should be kept. But `backtick_code_block.js` removes them. This patch fixes this behavior. This bug is introduced by the PR hexojs#3765
2 tasks
thom4parisot
pushed a commit
to thom4parisot/hexo
that referenced
this pull request
Jan 17, 2020
thom4parisot
pushed a commit
to thom4parisot/hexo
that referenced
this pull request
Jan 17, 2020
Blank lines in backtick code block on blockquote should be kept. But `backtick_code_block.js` removes them. This patch fixes this behavior. This bug is introduced by the PR hexojs#3765
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.
What does it do?
Fix #2969
This patch makes the filter "backtick_code_block" to remove '>' characters at the head of each line.
How many '>' characters should be removed?
It is decided by the number of '>' characters at the first line.
This patch works well even if there are too few '>' characters at the head of a line.
(Simply removes all '>' characters less than or equal to the number of '>' characters at the first lines.)
Note that this patch works well for a "lang=dos" or "lang=cmd" code block.
The body of these code blocks is usually starting with '>' (DOS prompt).
This patch keeps it if it follows '>' characters which is the same number of the first line.
For example,
is rendered to:
This PR is an alternative of the PR hexojs/hexo-util#110
Pull request tasks