alexwforsythe / code-blocks

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

Feature Request: Support code fence and auto highlight #100

Closed yangminzhu closed 5 years ago

yangminzhu commented 5 years ago

Let's say I have a doc with following contents:


Bla bla bla

```cpp int sum(int a, int b) { return a + b; } ```

Bla bla bla

```yaml name: config readonly: true data: - a - b - c ```

Bla bla bla


By clicking on a single button (for example: "format the doc"), all the code snippets (fenced by ``` with a language indication) in the doc are highlighted to the following:


Bla bla bla

int sum(int a, int b) {
  return a + b;
}

Bla bla bla

name: config
readonly: true
data:
  - a
  - b
  - c

Bla bla bla