Skip to content

Commit

Permalink
Add explanatory comment for '.unparsed'
Browse files Browse the repository at this point in the history
As I don't feel it is completely obvious.
  • Loading branch information
michaeljones committed Feb 18, 2022
1 parent 9c97e54 commit 5602cf5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions breathe/filetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ def get_extension(filename: str) -> str:
# If the filename is just '.ext' then we get ('.ext', '') so we fall back to first part if
# the second isn't there
(first, second) = os.path.splitext(filename)

# Doxygen allows users to specify the file extension ".unparsed" to disable syntax highlighting.
# We translate it into the pygments unhighlighted 'text' type
return (second or first).lstrip(".").replace("unparsed", "text")

0 comments on commit 5602cf5

Please sign in to comment.