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

TeX file adjustments. #971

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ CLI command and its behaviour. There are no guarantees of stability for the
- Java `.properties` files (#968)
- Apache HTTP server config `.htaccess` files (#985)
- npm `.npmrc` files (#985)
- LaTeX class files (`.cls`) (#971)
- Added comment styles:
- `man` for UNIX Man pages (`.man`) (#954)
- Added `--lines` output option for `lint`. (#956)
- Treat `% !TEX` and `% !BIB` as shebangs in TeX and BibTeX files, respectively
(#971)

### Changed

Expand Down
3 changes: 3 additions & 0 deletions src/reuse/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ class BibTexCommentStyle(CommentStyle):
SHORTHAND = "bibtex"

MULTI_LINE = MultiLineSegments("@Comment{", "", "}")
SHEBANGS = ["% !BIB", "%!BIB"]


class CCommentStyle(CommentStyle):
Expand Down Expand Up @@ -525,6 +526,7 @@ class TexCommentStyle(CommentStyle):

SINGLE_LINE = "%"
INDENT_AFTER_SINGLE = " "
SHEBANGS = ["% !TEX", "%!TEX"]


class UncommentableCommentStyle(EmptyCommentStyle):
Expand Down Expand Up @@ -607,6 +609,7 @@ class XQueryCommentStyle(CommentStyle):
".clj": LispCommentStyle,
".cljc": LispCommentStyle,
".cljs": LispCommentStyle,
".cls": TexCommentStyle,
".cmake": PythonCommentStyle, # TODO: Bracket comments not supported.
".code-workspace": CCommentStyle,
".coffee": PythonCommentStyle,
Expand Down
Loading