Allows you to use :escape_html as documented#352
Open
binford2k wants to merge 3 commits intortomayko:masterfrom
Open
Allows you to use :escape_html as documented#352binford2k wants to merge 3 commits intortomayko:masterfrom
binford2k wants to merge 3 commits intortomayko:masterfrom
Conversation
jeremyevans
suggested changes
Aug 3, 2022
Contributor
jeremyevans
left a comment
There was a problem hiding this comment.
This seems reasonable, but before merging this requires two changes:
- It needs to be updated so conflicts can be fixed
test/tilt_commonmarkertemplate_test.rbshould be updated to include tests for the correct behavior (which should presumably be broken before this PR, and fixed after this PR).
| !options[option] | ||
| else | ||
| options[option] | ||
| end |
Contributor
There was a problem hiding this comment.
parse_options/render_options setup code is similar enough and now complex enough to warrant extracting into a method. However, that can be done later if you don't want to do it in this PR.
| } | ||
| INVERT_OPTIONS = [ | ||
| :escape_html, | ||
| ] |
Contributor
There was a problem hiding this comment.
Unless you expect additional inverted options, I would avoid using a constant for this single value. However, that change can be done later.
| :GITHUB_PRE_LANG, | ||
| :HARDBREAKS, | ||
| :NOBREAKS, | ||
| :SAFE, |
Contributor
There was a problem hiding this comment.
According to the current source code, SAFE was removed in 0.18.0. Does removing this break compatibility with CommonMarker <0.18.0?
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.
See https://github.com/rtomayko/tilt/blob/master/docs/TEMPLATES.md#escape_html--truefalse
Supersedes #350