Update Commonmarker option#26
Merged
jeremyevans merged 1 commit intojeremyevans:masterfrom Feb 19, 2026
Merged
Conversation
Owner
|
Thank you for the report. I think the simplest solution instead of trying to play whack-a-mole every time a commonmarker option is added is to accept |
Owner
|
Since you've already done the work here, it seems simplest to just merge it as opposed to going with a |
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.
Hi!
These are the options Tilt currently allows to be passed to the Commonmarker gem:
tilt/lib/tilt/commonmarker.rb
Lines 47 to 74 in 2b1189f
But the Commonmarker gem supports quite a few more options than Tilt is currently able to pass on.
I haven't looked much at the Tilt code (other than finding out why my options aren't passed on), so I'm unsure what the best way forward would be.
If I understand it correctly, Tilt::Template has one flat
optionshash, that includes all sorts of options. Those are then parsed out and forwarded to the appropriate receiver.E.g. keep
:default_encodingtilt/lib/tilt/template.rb
Lines 93 to 95 in 2b1189f
but pass others to Commonmarker, such as
:autolinkas extention optiontilt/lib/tilt/commonmarker.rb
Line 80 in 2b1189f
and
:hardbreaksas render optiontilt/lib/tilt/commonmarker.rb
Line 79 in 2b1189f
I guess that "routing" of options is the reason why all keys must be defined in Tilt. So, I currently see no better way than to simply try to keep the options up-to-date with the upstream gem, right?.
Thank you for your hard work on this, I appreciate it a lot!