Skip to content

Commit

Permalink
Merge pull request #554 from fsfe/feature/apache-velocity-comments
Browse files Browse the repository at this point in the history
Apache Velocity template language comment style
  • Loading branch information
carmenbianca committed Oct 12, 2022
2 parents 3450858 + 5b6f7bd commit 94a609a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -45,6 +45,10 @@ The versions follow [semantic versioning](https://semver.org).
- Android Interface Definition Language (`.aidl`)
- Certificate files (`.pem`)

- Added comment style:

- Apache Velocity Template (Extensions: `.vm`, `.vtl`)

### Changed

- Updated PyPI development status to 'production/stable' (#381)
Expand Down
11 changes: 11 additions & 0 deletions src/reuse/_comment.py
Expand Up @@ -448,6 +448,15 @@ class UncommentableCommentStyle(EmptyCommentStyle):
"""


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

_shorthand = "vst"

# TODO: SINGLE_LINE requires refactor to support trailing `**`.
MULTI_LINE = MultiLineSegments("#*", " ", "*#")


class VimCommentStyle(CommentStyle):
"""Vim(Script|Config) style."""

Expand Down Expand Up @@ -639,7 +648,9 @@ class VimCommentStyle(CommentStyle):
".v": CCommentStyle, # V-Lang source code
".vala": CCommentStyle,
".vim": VimCommentStyle,
".vm": VelocityCommentStyle,
".vsh": CCommentStyle, # V-Lang script
".vtl": VelocityCommentStyle,
".vue": HtmlCommentStyle,
".xls": UncommentableCommentStyle,
".xlsx": UncommentableCommentStyle,
Expand Down

0 comments on commit 94a609a

Please sign in to comment.