artempyanykh / marksman

Write Markdown with code assist and intelligence in the comfort of your favourite editor.
MIT License
2.01k stars 35 forks source link

How do I mark a template token as a link? #220

Open UtkarshVerma opened 1 year ago

UtkarshVerma commented 1 year ago

I use Hugo to write my blog posts in Markdown. Hugo has shortcodes which are simply expressions evaluated at compile-time and then injected with the appropriate value. Currently, marksman thinks the link is invalid and gives the following diagnostic message:

image

Here is how I have defined links:

[rtems]: https://www.rtems.org/
[zsh]: https://www.zsh.org/
[hooks]: https://man.archlinux.org/man/zshcontrib.1.en#Manipulating_Hook_Functions

[gsoc]: {{< relref "/posts/gsoc" >}}

How do I get marksman to interpret that these shortcodes are valid links?

artempyanykh commented 1 year ago

@UtkarshVerma thanks for asking! These short-codes are not valid markdown, that's why the parser doesn't accept them. I'd be open to accept a PR that adds this functionality but personally won't have time for this any time soon.