summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2020-02-23 13:08:02 +0000
committerdakkar <dakkar@thenautilus.net>2020-02-23 13:08:02 +0000
commit1a52243a685183b5fed189ab69bbeb8a0e13a1fe (patch)
treebfc3e4bb3e55ad736d7f9dfdf22b7b81eda42d38 /index.js
parentuse github: scheme instead of git+https: (diff)
downloadcolor-1a52243a685183b5fed189ab69bbeb8a0e13a1fe.tar.gz
color-1a52243a685183b5fed189ab69bbeb8a0e13a1fe.tar.bz2
color-1a52243a685183b5fed189ab69bbeb8a0e13a1fe.zip
add rst grammar
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/index.js b/index.js
index e8e5463..8e35ff6 100644
--- a/index.js
+++ b/index.js
@@ -11,6 +11,9 @@ highlighter.requireGrammarsSync({
highlighter.requireGrammarsSync({
"modulePath": require.resolve('language-openscad/package.json'),
});
+highlighter.requireGrammarsSync({
+ "modulePath": require.resolve('language-restructuredtext/package.json'),
+});
const Selector = require('first-mate-select-grammar');
const selector = Selector();
@@ -25,6 +28,7 @@ function addExtensionsToGrammar(knownExtension,extraExtensions) {
}
addExtensionsToGrammar('cpp',['ino']);
+addExtensionsToGrammar('rst',['rst.txt','rest.txt']);
const server = http.createServer((req, res) => {
const filename = req.headers['filename'];