Skip to content

Commit

Permalink
Merge pull request #113 from MirBSD/add-tex
Browse files Browse the repository at this point in the history
add Teχ style (*.cls, *.sty, *.tex — for now)
  • Loading branch information
mathieucarbou authored Aug 16, 2016
2 parents 7b0e053 + bc7f1ab commit 7a28350
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ The plugin has been designed so that it is very easy to add new supports for new
--->
```

- `PERCENT_STYLE` (Teχ like comments): *.cls, *.sty, *.tex

```
% comment
```

- `PERCENT3_STYLE` (Erlang like comments): *.erl, *.hrl

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public enum DocumentType {
SHELL("sh", HeaderType.SCRIPT_STYLE),
SQL("sql", HeaderType.DOUBLEDASHES_STYLE),
TAGX("tagx", HeaderType.XML_STYLE),
TEX_CLASS("cls", HeaderType.PERCENT_STYLE),
TEX_STYLE("sty", HeaderType.PERCENT_STYLE),
TEX("tex", HeaderType.PERCENT_STYLE),
TLD("tld", HeaderType.XML_STYLE),
TS("ts", HeaderType.TRIPLESLASH_STYLE),
TXT("txt", HeaderType.TEXT),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public enum HeaderType {
////////// COMMENT TYPES //////////

// FirstLine Before EndLine After SkipLine FirstLineDetection LastLineDetection allowBlankLines isMultiline
// firstLine beforeEachLine endLine afterEachLine skipLinePattern firstLineDetectionPattern endLineDetectionPattern allowBlankLines isMultiline padLines
//generic
JAVADOC_STYLE("/**", " * ", " */", "", null, "(\\s|\\t)*/\\*.*$", ".*\\*/(\\s|\\t)*$", false, true, false),
SCRIPT_STYLE("#", "# ", "#EOL", "", "^#!.*$", "#.*$", "#.*$", false, false, false),
Expand All @@ -46,6 +46,7 @@ public enum HeaderType {
DOUBLETILDE_STYLE("~~", "~~ ", "~~EOL", "", null, "~~.*$", "~~.*$", false, false, false),
DYNASCRIPT_STYLE("<%--EOL", " ", "EOL--%>", "", null, "(\\s|\\t)*<%--.*$", ".*--%>(\\s|\\t)*$", true, true, false),
DYNASCRIPT3_STYLE("<!---EOL", " ", "EOL--->", "", null, "(\\s|\\t)*<!---.*$", ".*--->(\\s|\\t)*$", true, true, false),
PERCENT_STYLE("", "% ", "EOL", "", null, "^% .*$", "^% .*$", false, false, false),
PERCENT3_STYLE("%%%", "%%% ", "%%%EOL", "", null, "%%%.*$", "%%%.*$", false, false, false),
EXCLAMATION3_STYLE("!!!", "!!! ", "!!!EOL", "", null, "!!!.*$", "!!!.*$", false, false, false),

Expand Down
14 changes: 14 additions & 0 deletions license-maven-plugin/src/test/resources/styles/percent_style.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
% Copyright (C) ${year} http://code.google.com/p/maven-license-plugin/
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS,
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
% See the License for the specific language governing permissions and
% limitations under the License.

0 comments on commit 7a28350

Please sign in to comment.