Skip to content

Conversation

tompng
Copy link
Member

@tompng tompng commented Mar 23, 2025

Create intermediate rule ExplicitLinkWithLabel that returns {label:, link:}, so that Image rule does not need to re-parse rdoc link format again.

# Before
"[text](url)"  "{text}(url)"
"![text](url)"  Image("{text}(url)") (parse with regexp) "rdoc-image:url:text"

# After
"[text](url)"  ExplicitLink({ label: 'text', link: 'url' })  "{text}(url)"
"![text](url)"  Image({ label: 'text', link: 'url' })  "rdoc-image:url:text"

#1322

…xplicitLink(return rdoc link format string)

Create intermediate rule ExplicitLinkWithLabel that returns `{label:, link:}`, so that Image rule does not need to re-parse rdoc link format again.
@tompng tompng merged commit 8e4324d into ruby:master Mar 23, 2025
30 checks passed
@ioquatix
Copy link
Member

Thanks!

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.

3 participants