Clarify: emphasis delimiters inside link destinations are literal#378
Open
dereuromark wants to merge 1 commit intojgm:mainfrom
Open
Clarify: emphasis delimiters inside link destinations are literal#378dereuromark wants to merge 1 commit intojgm:mainfrom
dereuromark wants to merge 1 commit intojgm:mainfrom
Conversation
bdb9094 to
038b426
Compare
Add a note to the Precedence section explaining that inline formatting delimiters inside link destinations (URLs in parentheses) are treated as literal text and don't participate in emphasis matching. See jgm#375
038b426 to
c854d7c
Compare
Contributor
Author
|
@jgm This appears to still be open. I think with the merge of the others this should be good to go now. |
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.
Related: #375
JS implementation fix: jgm/djot.js#125
PHP implementation fix: php-collective/djot-php#81
Summary
Adds a clarifying note to the Precedence section of the syntax spec explaining that inline formatting delimiters inside link destinations are treated as literal text.
This covers the destination-only case:
_or*inside a URL like(http://example.com?foo_bar=1)does not participate in emphasis matchingThe bracket-text case (
_[bar_](url)) is intentionally not changed - emphasis continues to take precedence per the existing "first to start wins" rule.Per discussion in #375, this is the simpler fix that addresses the main real-world issue (URLs with underscores in query params) without the complexity of lookahead parsing.