Skip to content

Allows you to use :escape_html as documented#352

Open
binford2k wants to merge 3 commits intortomayko:masterfrom
binford2k:patch-1
Open

Allows you to use :escape_html as documented#352
binford2k wants to merge 3 commits intortomayko:masterfrom
binford2k:patch-1

Conversation

@binford2k
Copy link

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, but before merging this requires two changes:

  1. It needs to be updated so conflicts can be fixed
  2. test/tilt_commonmarkertemplate_test.rb should 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the current source code, SAFE was removed in 0.18.0. Does removing this break compatibility with CommonMarker <0.18.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants