Closed smoelius closed 1 year ago
Hi. Currently they are not supported but that's something we would like to have. I don't give it a lot of priority, but it is certainly a nice to have.
It shouldn't be too hard to implement, but it is not trivial either. PRs are welcome though.
Could you say a couple of sentences about what you imagine the change looking like?
Sure. All magic happens in intralinks.rs
. There is a struct MarkdownInlineLink
that represents an inline link. This is created by fn markdown_inline_link_iterator()
. I suggest we introduce a enum like this:
enum MarkdownLinkInfo {
Inline { link: MarkdownInlineLink },
ReferenceDefinition { reference_definition: MarkdownReferenceDefinition }
}
and change markdown_inline_link_iterator()
to return MarkdownItemIterator<MarkdownLink>
. This function uses pulldown_cmark
to parse the markdown. Not sure how reference links definitions are represented (write a unit tests and add some println!()
and it should become obvious).
Once you change the return type of markdown_inline_link_iterator()
the compiler should guide you through.
Am I correct to infer that intralink support does not extend to reference style links? Would they be difficult to support?