-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for HTML links inside comments #203
Comments
From the mustache documentation at //mustache.github.io/mustache.5.html All variables are HTML escaped by default. If you want to return unescaped HTML, use the triple mustache: {{{name}}}. |
Thanks for the answer. But I think using this method I can only switch off escaping for the whole comment, not only for links. Is there a way to detect that a part of the comment is an HTML link and switch off escaping just for that part? |
I'm afraid this is not really possible, short of the tool automatically detecting links in the comment text and doing the link-ification of them. But this can't really work, since the tool can't know if the output is HTML or not (a custom template may be used) :/ I'm afraid you'll have to use {{{ }}} in your custom template, to turn off automatic escaping, and then make sure you do any escaping needed manually. |
I am using
protoc-gen-doc
to generate HTML documentation. I would like to add HTML links in the comments that appear as clickable links in the documentation.Example:
Unfortunately the link is not clickable in the resulting documentation. So I tried to add HTML code in the comment like
but that gets escaped and also does not work.
Is there any other way in order to get clickable links?
The text was updated successfully, but these errors were encountered: