diff --git a/CHANGELOG.md b/CHANGELOG.md index 825c32f..1339413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,5 @@ # Changelog + +## v0.1.0 - 11/16/2020 + +Initial release. diff --git a/package-lock.json b/package-lock.json index 00b9a0c..df08db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1461,6 +1461,12 @@ "esprima": "^4.0.0" } }, + "json": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/json/-/json-10.0.0.tgz", + "integrity": "sha512-iK7tAZtpoghibjdB1ncCWykeBMmke3JThUe+rnkD4qkZaglOIQ70Pw7r5UJ4lyUT+7gnw7ehmmLUHDuhqzQD+g==", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", diff --git a/package.json b/package.json index c980e15..8559b61 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "texinfo", "displayName": "Texinfo Language Support", - "description": "Provides basic editing experience for the Texinfo language, including syntax highlighting, code completion, HTML preview, etc.", + "description": "Provides basic editing experience for Texinfo documents, including syntax highlighting, code completion, HTML preview, etc.", "publisher": "cismonx", "version": "0.1.0", "author": { @@ -24,6 +24,7 @@ "@typescript-eslint/parser": "^4.7.0", "cson": "^7.20.0", "eslint": "^7.13.0", + "json": "^10.0.0", "language-texinfo": "^1.0.0", "node-html-parser": "^2.0.0", "ts-loader": "^8.0.11", diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 485cede..5ffe92c 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -5,4 +5,4 @@ DEST_PATH=./out/grammars mkdir -p $DEST_PATH cp $SRC_PATH/LICENSE.md $DEST_PATH # Convert TextMate grammar from CSON to JSON, as VSCode cannot recognize CSON ones. -cson2json $SRC_PATH/grammars/texinfo.cson > $DEST_PATH/texinfo.json +cson2json $SRC_PATH/grammars/texinfo.cson | json -j0 > $DEST_PATH/texinfo.json diff --git a/src/contexts/preview.ts b/src/contexts/preview.ts index d41e1cd..7c5404a 100644 --- a/src/contexts/preview.ts +++ b/src/contexts/preview.ts @@ -125,6 +125,8 @@ export default class PreviewContext { "switch (message.command) {" + "case 'goto':" + "window.location.hash = message.value;" + + // We may want to scroll to the same node again. + "history.pushState('', '', window.location.pathname);" + "break;" + "}" + "})";