Re: [Doxygen-users] Turn off syntax highlighting in fenced code blocks
Brought to you by:
dimitri
|
From: Mark <dox...@er...> - 2020-07-21 00:34:35
|
I looked at the Doxygen code and discovered that a fenced code block in a Markdown file is converted to @code … @endcode block before further processing. I have also discovered that @code{.unparsed} in a .cpp file results in the same “hljs” syntax highlighting. Is this a bug in doxygen or something undocumented? The documentation quite clearly states
"If the contents of the code block are in a language that doxygen cannot parse, doxygen will just show the output as-is. You can make this explicit using .unparsed, or by giving some other extension that doxygen doesn't support, e.g.
\code{.unparsed}
Show this as-is please
\endcode
“
Regards
-Mark
> On Jul 20, 2020, at 14:30, Mark <dox...@er...> wrote:
>
> No, sadly that doesn’t work either. Nor does ```unparsed.
>
> doxygen seems to think these blocks are some language called hljs. This is the HTML for the example I gave below:
>
> code class="fragment <>"><span class="hljs-selector-tag <>">Support</span> 16<span class="hljs-selector-tag <>">-bit</span> <span class="hljs-selector-tag <>">and</span> <span class="hljs-selector-tag <>">paletted</span> <span class="hljs-selector-tag <>">images</span>.
> <span class="hljs-selector-tag <>">Fixes</span> <span class="hljs-selector-id <>">#252</span>. <span class="hljs-selector-tag <>">Fixes</span> <span class="hljs-selector-id <>">#253</span>. <span class="hljs-selector-tag <>">Fixes</span> <span class="hljs-selector-id <>">#255</span>.
> </code></pre></div>
> Regards
>
> -Mark
>
>> On Jul 20, 2020, at 14:08, Travis Everett <tra...@gm... <mailto:tra...@gm...>> wrote:
>>
>> Drat. I know that works for some other markdown-based systems I use.
>>
>> I found a mention in the docs for the \code command (https://www.doxygen.nl/manual/commands.html#cmdcode <https://www.doxygen.nl/manual/commands.html#cmdcode>) that mention using `{.unparsed}` to explicitly specify blocks like this. If the Markdown equivalent is flowing through the same code site, perhaps that'll work?
>>
>> On Mon, Jul 20, 2020 at 3:55 PM Mark <dox...@er... <mailto:dox...@er...>> wrote:
>>
>> Thanks for the suggestion. No it does not. I tried ```plain, ```.plain ```{plain} and ```{.plain}. None had any effect.
>>
>> I’ve also discovered that \verbatim is doing the same highlighting.
>>
>> For example the text
>>
>> Support 16-bit and paletted images
>> .
>>
>> Fixes #252. Fixes #253. Fixes #255.
>>
>> is rendered with everything but “16” in boldface and the numbers after Fixes rendered in red.
>>
>> Regards
>>
>> -Mark
>>
>>
>>> On Jul 20, 2020, at 13:27, Travis Everett <tra...@gm... <mailto:tra...@gm...>> wrote:
>>>
>>> Does `plain` work?
>>>
>>> On Mon, Jul 20, 2020 at 3:04 PM Mark <dox...@er... <mailto:dox...@er...>> wrote:
>>> I have a fenced code block
>>>
>>> ```
>>> Text that is not code
>>> ```
>>>
>>> and it is being highlighted. How can I prevent that? I tried ```text and ```plaintext, ```{.text} and ```{.txt} but none made any difference.
>>>
>>> Regards
>>>
>>> -Mark
>>>
>>> _______________________________________________
>>> Doxygen-users mailing list
>>> Dox...@li... <mailto:Dox...@li...>
>>> https://lists.sourceforge.net/lists/listinfo/doxygen-users <https://lists.sourceforge.net/lists/listinfo/doxygen-users>
>>
>
|