alexwforsythe / code-blocks

Syntax highlighting for Google Docs
https://www.alexwforsythe.com/code-blocks/
MIT License
698 stars 88 forks source link

I am trying the codeblocks in google docs. I found the syntax highlighting not complete #116

Closed sant527 closed 3 years ago

sant527 commented 4 years ago

I have few linux commands and code blocks for google docs is not showing the syntax properly

What i am getting in google docs

google_docs_code_block

what i am expecting or what i get in sublime text:

google_docs_code_block2

AugustM commented 4 years ago

[I'm not the developer, I'm just a user.]

Code Blocks uses the highlight.js javascript library to do the actual parsing. Syntax errors can be addressed by the folks who maintain that library. Right now, they are dependent on whoever contributed the module for any particular language to maintain that language. You might volunteer.

I found a syntax error in how Code Blocks handles VIM files -- it highlights keywords even when they are part of comment text. I have a note in to the highlight.js folks just this morning asking how I might contribute to fixing that. I have no idea when I'll hear back.

In any case, the syntax issues come from the highlight.js library, not Code Blocks.

I hope this helps, August

.

alexwforsythe commented 3 years ago

From the README:

If you'd like to see Code Blocks update or fix support for an existing language:

  1. Check if the latest version of highlight.js already includes the update. If it does, submit a PR to this repository that bumps the highlight.js version in package.json.
  2. If highlight.js does not yet include the update, please submit an issue on their issue tracker.