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
In my swagger.json file, I have a few raw links that are getting converted into hyperlinks, and I don't know how to prevent this. It ends up looking really bad when placed in a <pre> block.
Snippet from the swagger. json
"tags": [
{"name":"overview",
"description": "... Example: Using cURL, we can query the service locations <code>curl -I https://domain.com/api/v1/sl</code> and find the <code>Link</code> header<pre>Link: <https://domain.com/api/v1/sl?page=1>; rel=\"next\",\n <https://domain.com/api/v1/sl?page=10>; rel=\"last\"\n</pre>"
}
]
When rendered looks like
I would love for some way to turn off hyperlink conversion in <pre> and <code> blocks as it doesn't make sense to have them as links (and it really clashes with the css as well). Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered:
@jroweboy instead of directly using <code> and <pre> use markdown mechanism for this so markdown renderer knows when to escape:
description: | ... Example: Using cURL, we can query the service locations `curl -I https://domain.com/api/v1/sl` and find the `Link` header ``` Link: <https://domain.com/api/v1/sl?page=1>; rel="next", <https://domain.com/api/v1/sl?page=10>; rel="last" ```
or in json:
{
"description": "... Example: Using cURL, we can query the service locations `curl -I https://domain.com/api/v1/sl` and find the `Link` header\n```\nLink: <https://domain.com/api/v1/sl?page=1>; rel=\"next\",\n<https://domain.com/api/v1/sl?page=10>; rel=\"last\"\n```\n"
}
There is an issue in the 1.16.2 version that didn't escape HTML characters in backticks blocks (#378) but it is fixed now and a new ReDoc version will be released soon.
As a temporal workaround, you can specify some language after backticks:
In my swagger.json file, I have a few raw links that are getting converted into hyperlinks, and I don't know how to prevent this. It ends up looking really bad when placed in a
<pre>
block.Snippet from the swagger. json
When rendered looks like

I would love for some way to turn off hyperlink conversion in
<pre>
and<code>
blocks as it doesn't make sense to have them as links (and it really clashes with the css as well). Any help is greatly appreciated.The text was updated successfully, but these errors were encountered: