-
Notifications
You must be signed in to change notification settings - Fork 603
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
V2.1.0 fix quote #694
Open
moisespsena
wants to merge
234
commits into
russross:master
Choose a base branch
from
moisespsena-go:v2.1.0-fix-quote
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
V2.1.0 fix quote #694
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
The callbacks used to return bools, but none of the actual implementations return false, always true. So in order to make further refactorings simpler, make the interface reflect the inner workings: no more return values, no more conditionals.
Split Header into two events: BeginHeader and EndHeader, removing the need for callback.
Split List into two events: BeginList and EndList, removing the need for callback.
Split Paragraph into two events: BeginParagraph and EndParagraph, removing the need for callback.
Split Footnotes into two events: BeginFootnotes and EndFootnotes, removing the need for callback.
From 'options' to 'r'. This change contains only a massive rename, no other changes.
Link parser used to truncate in two cases: when parsing image links and inline footnotes. In order to avoid this truncation, introduce a separate callback for each of these cases and avoid writing extra characters instead of truncating them after the fact.
Replace output truncation with appropriate inline callbacks. lineBreak() is now only responsible for handling HardLineBreak. BackslashLineBreak is handled in escape() and trailing whitespace is considered in maybeLineBreak().
Autolink detection used to be triggered by a colon and preceding protocol name used to be rewound. Now instead of doing that, trigger autolink processing on [hmfHMF] and see if it looks like a link.
Change the way maybeLineBreak gets called to avoid breaking up stretches of unprocessed characters that smartypants expects. This inline processing is getting a bit out of hand, something needs to be done about it.
This only removes the parameter from func declarations, not from their bodies, so obviously breaks everything. Will be restored in upcoming commits.
This only removes the parameter from declarations, everything is broken at the moment.
Still not all of them, still broken.
Add a structure to collect output in a buffer (replaces what used to be the 'out' parameter all over the place). Notable things about this struct are the captureBuff and copyBuff buffers. They're intended to redirect all the output (captureBuff) or make a copy of all the output (copyBuff) while they're set to non-nil. Here's an example of their intended use: // what used to be a temp buffer as an 'out' parameter // var cellWork bytes.Buffer // p.inline(&cellWork, data[cellStart:cellEnd]) // can now be captured like this: cellWork := p.r.CaptureWrites(func() { p.inline(data[cellStart:cellEnd]) })
Remove the 'out' parameter. Also, instead of returning and passing the position of TOC, use CopyWrites to capture contents of the header and pass that captured buffer instead.
Use CaptureWrites where output should go to a temp buffer instead of the final output.
It's only used in a single place and should probably be refactored away, but this workaround is OK for now.
Add proper capture groups to fix the order of bits and pieces.
The main Node structure that holds every AST node and some supplementary substructs. A bit of helper code to handle the nodes.
This is the new renderer that walks AST and renders everything to a buffer. Completely covers all the functionality of the previous renderer and will likely replace it.
Build a partial tree by adding block nodes. The block nodes will then be traversed and inline markdown parsed inside each of them. Tests are broken at this point until the full tree is constructed.
Parse the content of the block nodes for inline markdown, decorate the tree with what's found. Tests still broken, need to connect the dots.
Connect the block and inline parsers. Most of the tests now pass, only a couple fail, they need fixes in the test suite.
This should fix russross#403
Use the same .travis.yml on master and v2
We do not have a single go statement in Blackfriday code, -race does nothing for us, but burn CPU cycles (and it hurts because we're hitting timeouts on full test runs).
…tities in code blocks.
…s#509) The goal of this change is to reduce number of non-standard library packages (repositories) that blackfriday imports (not counting imports used only for tests) from 1 to 0, and in turn, reduce the cost of importing blackfriday into other projects. Do so by documenting the algorithm of SanitizedAnchorName, and include a copy of the small function inside blackfriday itself. The same functionality continues to be available in the original location, github.com/shurcooL/sanitized_anchor_name.Create. It can be used by existing users and those that look for a small package, and don't need all of blackfriday functionality. Existing users of blackfriday can use the new SanitizedAnchorName function directly and avoid an extra package import. This change is a port of PR russross#352 from v1 into v2. Updates russross#348. Updates russross#350.
This changes the default `params.FootnoteReturnLinkContents` from `<sup>[return]</sup>` to `↩\ufe0e`. It’s very common to use `↩` in footnote links. However, some platforms like iOS and iPadOS choose to use emoji presentation for this particular character. This leads to lots of blogs, by default, looking silly on portable Apple gizmos, as described in <jgm/pandoc#5469>. By switching to a return arrow with a disable-emojification variation selector, we get blackfriday to do the right thing by default. Additionally, ↩ is more language-agnostic than “return” is, so blackfriday will work better out of the box for more people.
Export Node.IsContainer and add Node.IsLeaf
Add ftp link to test other protocols
Add ftp test
fix error in updating file
Fix error in updating file
add tests for ftp links
Use ↩ as default params.FootnoteReturnLinkContents
Fix html renderer escaping valid entities
This change makes it clear that the v2 import path is github.com/russross/blackfriday/v2, and updates various links accordingly. See russross#587 (comment) for details. This change also converges the README for v1 and v2 to be consistent, as they've started to drift apart. For russross#587. GitHub-Pull-Request: russross#675
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 the quotes joins on multiple quotes.