Closed johnlindquist closed 8 years ago
@johnlindquist Thanks for reporting.
Currently, gitbook-plugin-include-codeblock use language-map for detecting lang type by .ext
.
Oh, .ts
is duplicated.
Perhaps adding an explicit class as a third param is the solution:
[import, hello-world.js, lang-typescript](hello-world.ts)
It is possible, I think.
language-map has "aceMode"
property for each language.
I'm try to implement.
I've implemeted suggested feature #11
Wow, that was fast :)
Seems to work perfectly. Thanks so much.
When you import a TypeScript file
.ts
: The parser correctly finds.ts
in the languages.json extensions for bothTypeScript
andXML
, then automatically chooses XML.Because this is the correct behavior (I'm assuming
.ts
is a valid extension for XML), the only approach is tell the parser exactly which language you want to be provided toclass='lang-typescript'.
Perhaps adding an explicit class as a third param is the solution:
[import, hello-world.js, lang-typescript](hello-world.ts)