Skip to content

Commit

Permalink
Merge pull request #954 from carmenbianca/man-style
Browse files Browse the repository at this point in the history
Add support for Unix manual pages (`.man`)
  • Loading branch information
carmenbianca authored Apr 8, 2024
2 parents d566aa9 + d8e989f commit 535daa6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ CLI command and its behaviour. There are no guarantees of stability for the
- CUDA-C++ (`.cu`, `.cuh`) (#938)
- Various .NET files (`.csproj`, `.fsproj`, `.fsx`, `.props`, `.sln`,
`.vbproj`) (#940)
- Added comment styles:
- `man` for UNIX Man pages (`.man`) (#954)

### Changed

Expand Down
11 changes: 11 additions & 0 deletions src/reuse/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,16 @@ class UncommentableCommentStyle(EmptyCommentStyle):
"""


class UnixManCommentStyle(CommentStyle):
"""UNIX manual page comment style."""

SHORTHAND = "man"

# In case the below is difficult to read, the comment character is: .\"
SINGLE_LINE = r".\""
INDENT_AFTER_SINGLE = " "


class VelocityCommentStyle(CommentStyle):
"""Apache Velocity Template Language comment style."""

Expand Down Expand Up @@ -681,6 +691,7 @@ class XQueryCommentStyle(CommentStyle):
".lsp": LispCommentStyle,
".lua": HaskellCommentStyle,
".m4": M4CommentStyle,
".man": UnixManCommentStyle,
".markdown": HtmlCommentStyle,
".md": HtmlCommentStyle,
".mjs": CCommentStyle,
Expand Down

0 comments on commit 535daa6

Please sign in to comment.