Skip to content
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

Code highlighting does not account for unparsed case #805

Closed
gmarull opened this issue Feb 15, 2022 · 5 comments · Fixed by #806
Closed

Code highlighting does not account for unparsed case #805

gmarull opened this issue Feb 15, 2022 · 5 comments · Fixed by #806

Comments

@gmarull
Copy link
Contributor

gmarull commented Feb 15, 2022

It looks like additions made in #760 don't account for the unparsed case:

 \code{.unparsed}
  Show this as-is please
  \endcode

Pygments highlighter doesn't support this language, and so it ends up generating a warning during build process.

gmarull added a commit to teslabs/sdk-nrf that referenced this issue Feb 15, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
gmarull added a commit to teslabs/zephyr that referenced this issue Feb 15, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
rlubos pushed a commit to nrfconnect/sdk-nrf that referenced this issue Feb 15, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
carlescufi pushed a commit to zephyrproject-rtos/zephyr that referenced this issue Feb 15, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
@2bndy5
Copy link
Contributor

2bndy5 commented Feb 15, 2022

well, I guess we could add a specific case for this language (never heard of a file extension called .unparsed), but my first impression is that it is more of an issue with pygments.

If you don't want syntax highlighting, then you should use \code(.txt}.
image
There might be a chance that pygments could guess that the syntax is CMake script, but I doubt that would be a problem because breathe tells pygments what lexer to use (via pygments API) when doxygen's \code block is provided a filename arg.

@2bndy5
Copy link
Contributor

2bndy5 commented Feb 15, 2022

oh! I just found this in the doxygen manual

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

Looks like we should add this special case due to doxygen's limited syntax highlighting. I still think, that using .txt is more acceptable than something specific to doxygen because doygen doesn't support a .txt extension within doxygen's list of supported language parsers.

@gmarull
Copy link
Contributor Author

gmarull commented Feb 15, 2022

I think breathe really needs to support Doxygen syntax, that is, ignore syntax highlight for the .unparsed case. Otherwise, breathe is really breaking Doxygen compatibility.

@2bndy5
Copy link
Contributor

2bndy5 commented Feb 15, 2022

I'm already looking into a solution that does just that. Seems there was some more changes pushed to that PR that I didn't track...

@2bndy5
Copy link
Contributor

2bndy5 commented Feb 15, 2022

I submitted a patch for this.

@gmarull Thank you again for commenting on the appropriate PR. I'm not a maintaining member, so I'm not subscribed to all breathe-related notifications.

coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this issue Feb 16, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

(cherry picked from commit 10da718)

Signed-off-by: Gerard Marull-Paretas <[email protected]>
GitOrigin-RevId: 10da718
Change-Id: I58f8a3bef0474da6eb980efdebed5ca4698f9349
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/3463028
Tested-by: CopyBot Service Account <[email protected]>
Reviewed-by: Keith Short <[email protected]>
Tested-by: Keith Short <[email protected]>
Commit-Queue: Keith Short <[email protected]>
gmarull added a commit to nrfconnect/sdk-zephyr that referenced this issue Feb 23, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
gmarull added a commit to nrfconnect/sdk-zephyr that referenced this issue Feb 24, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 10da718)
gmarull added a commit to nrfconnect/sdk-zephyr that referenced this issue Feb 24, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 10da718)
carlescufi pushed a commit to nrfconnect/sdk-zephyr that referenced this issue Feb 24, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 10da718)
carlescufi pushed a commit to nrfconnect/sdk-zephyr that referenced this issue Feb 24, 2022
Looks like the 4.33 release has some more issues, so let's wait until
everything gets fixed before allowing future versions.

Ref. breathe-doc/breathe#805

Signed-off-by: Gerard Marull-Paretas <[email protected]>
(cherry picked from commit 10da718)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants