Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
out
node_modules
.vscode
.vscode-test
test/**/temp
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ If `true`, automatically add the default "TODO" marker. Default is `true`.

## Supported languages
Java, Javascript, C#, C, C++, F#, Python, Ruby, Coffee Script, R, Haskell, Lua, Go, Perl,
Markdown, Css, Scss, Less, Latex, Typescript, Elixir, Shell Script, Twig, Visual Basic, Matlab.
Markdown, Css, Scss, Less, Latex, Typescript, Elixir, Shell Script, Twig, Visual Basic, Matlab, HTML.

*Note that multi-line comment style is only supported in languages that have the syntax in the example.*

Expand Down
3 changes: 2 additions & 1 deletion src/const/RegexStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export const RG_FSHARP = "\\(\\*([\\s\\S]*?)\\*\\)|//([^\\r\\n]+)";
export const RG_CSS = "/\\*([^*]*\\*+(?:[^/*][^*]*\\*+)*)/";
export const RG_LATEX = "%\\s*(.+)";
export const RG_VB = "(?:'|REM)\s*([^\\r\\n]+)";
export const RG_TWIG = "{#([\\s\\S]*?)#}";
export const RG_TWIG = "{#([\\s\\S]*?)#}";
export const RG_XML = "<!--\\s*(.+)";
6 changes: 4 additions & 2 deletions src/types/LanguageType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Dictionary, hashCode} from '../utils/all';
import {RegexType} from './RegexType';
import {RG_JAVA, RG_PYTHON, RG_ADA, RG_FSHARP, RG_CSS, RG_LATEX, RG_VB, RG_TWIG} from '../const/all';
import {RG_JAVA, RG_PYTHON, RG_ADA, RG_FSHARP, RG_CSS, RG_LATEX, RG_VB, RG_TWIG, RG_XML} from '../const/all';

var map = new Dictionary<string, LanguageType>();

Expand Down Expand Up @@ -62,6 +62,8 @@ export class LanguageName {
static ELIXIR = new LanguageType("elixir", new RegexType(RG_PYTHON));
static BASH = new LanguageType("shellscript", new RegexType(RG_PYTHON));
static VB = new LanguageType("vb", new RegexType(RG_VB));
static TWIG = new LanguageType("twig", new RegexType(RG_TWIG));
static TWIG = new LanguageType("twig", new RegexType(RG_TWIG));
static MATLAB = new LanguageType("matlab", new RegexType(RG_LATEX));
static HTML = new LanguageType("html", new RegexType(RG_XML));
static COLDFUSION = new LanguageType("cfm", new RegexType(RG_XML));
}
4 changes: 4 additions & 0 deletions test/samples/html.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<html>
<!-- TODO: Generate content. -->
</html>