You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@tompng as per our discussion, I've pulled this out into a follow-up action.
Let me know if there is anything I can do here to help. It sounds like you have a strong opinion about how to refactor this, so I'm happy to defer to you.
Create intermediate rule ExplicitLinkWithLabel that returns `{label:,
link:}`, so that Image rule does not need to re-parse rdoc link format
again.
```ruby
# Before
"[text](url)" → "{text}(url)"
"" → Image("{text}(url)") →(parse with regexp)→ "rdoc-image:url:text"
# After
"[text](url)" → ExplicitLink({ label: 'text', link: 'url' }) → "{text}(url)"
"" → Image({ label: 'text', link: 'url' }) → "rdoc-image:url:text"
```
#1322
Perhaps it could be more simple if
ExplicitLink
returns structured data(need to change
Link = ExplicitLink | ReferenceLink | AutoLink
to return a string if ExplicitLink returns hash)Originally posted by @tompng in #1320 (comment)
The text was updated successfully, but these errors were encountered: