diplodoc-platform / diplodoc-platform/transform
fix(plugins/links): mark link_open as reflink
- Dominant language
- TypeScript
- Stars
- 69
- Forks
- 59
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 6
Description
[plugins/links](https://github.com/diplodoc-platform/transform/blob/master/src/transform/plugins/links/index.ts)
We have reflink syntax, this markup `[{#T}](file.md)` extracts title from `file.md` and uses it as link text.
We need to mark `link_open` token with `markup: reflink`(analogous to how `autolinks` are parsed).
Right now i am doing it inside [@diplodoc-platform/markdown-translation](https://github.com/diplodoc-platform/markdown-translation) library when rendering tokens into XML.
Objectively links of reflink type should just be marked as such by parser.
to easier understand the token structure checkout tokens tab: [link to the playground](https://diplodoc-platform.github.io/playground/?input=%255B%257B%23T%257D%255D%28file.md%2520%2522title%2522%29)
Contributor guide
Assessment
This issue has not been assessed yet.