Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change highlighter to support typescript #62

Open
aurelien-baudet opened this issue Jun 25, 2018 · 1 comment
Open

Change highlighter to support typescript #62

aurelien-baudet opened this issue Jun 25, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@aurelien-baudet
Copy link
Contributor

Coderay doesn't seem to handle TypeScript. Use highlight.js instead ?

/!\ Ensure that code source extensions are still working

@aurelien-baudet aurelien-baudet added the enhancement New feature or request label Jun 25, 2018
@aurelien-baudet
Copy link
Contributor Author

aurelien-baudet commented Jun 28, 2018

CodeRay doesn't support typescript for now.
Highlight.js can support typescript but doesn't support other features (line numbers and our custom extensions, console source codes, pdf format, ...).

Several possibilities:

  1. Add a CodeRay extension to support typescript or make a PR (see https://github.com/rubychan/coderay/blob/master/lib/coderay/scanners/java_script.rb)
  2. Indicate that code is JavaScript instead of TypeScript
  3. Use Highlight.js but update it to support custom extensions, line numbers and other features
  4. Use another syntax highlighter ? It must be compatible with asccidoctorj
  5. Replace use of maven by a docker image that uses ruby instead of java in order to use another syntax highlighter (ensure that support of another syntax highlighter still supports all existing features). For the moment only pygments could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant