Closed cjcarpen closed 3 years ago
Unfortunately it's not available in npmjs, so baking the support in would require shipping the highlightjs-terraform. Not sure if this is a problem or not, but would prefer to avoid doing this.
So for now at least the solution is to add support for this via an extension like the one attached here. So just unzip this somewhere and add a --extension-file
command-line arg that points at its terraformExt.js.
terraform.zip
The solution in my previous comment doesn't work in the case of the extension not residing within marked-it-cli's directory hierarchy. I've fixed this case by defining a proper extension point in marked-it-cli for extensions to provide syntax styling functions.
To make this work, get the marked-it-cli 0.23.0 release, and replace the content of the previous comment's terraformExt.js file with:
var definition = require("./terraform").definer;
function getAdditionalLanguages() {
return {terraform: definition};
}
module.exports.styling = {code: {syntax: {getAdditionalLanguages: getAdditionalLanguages}}};
module.exports.id = "terraform";
Extend the highlight.js syntax highlighting by adding support for the terraform package: https://github.com/highlightjs/highlightjs-terraform