Skip to content

Commit

Permalink
Update syntax highlighting languages
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlesage committed Jun 27, 2020
1 parent b9160fd commit 5e64283
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 101 deletions.
64 changes: 42 additions & 22 deletions docs/de/reference/markdown-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,36 +101,56 @@ Zettlr also supports so-called "fenced code blocks." These are the block-version

Zettlr supports syntax highlighting for several script and programming languages. You have to tell Zettlr explicitly which language to use by simply adding its identifier _directly after the introducing code fence_. So to direct Zettlr to highlight a code fence using a JavaScript interpreter, you would need to begin the code block with three backticks, directly followed by the word "javascript" on an empty line.

Currently, the following languages are supported by the engine (the names in braces are the identifiers you would need to use in Zettlr, as they do not contain special characters, which might upset an engine):

- C (c)
- C# (csharp)
- C++ (cpp)
- CSS (css)
- Go (go)
- Java (java)
- JavaScript (javascript)
- Kotlin (kotlin)
- LESS (less)
- Objective C (objectivec)
- PHP (php)
- Python (python)
- R (r)
- Ruby (ruby)
- SQL (sql)
- Swift (swift)
- Shell/Bash
- YAML (yaml)
Currently, the following languages are supported by the engine (the names in braces are the identifiers you'd need to indicate the language):

- C (`c`)
- C# (`c#`; `csharp`; `cs`)
- C++ ( `c++`; `cpp`)
- Common Lisp (`clisp`; `commonlisp`)
- CSS (`css`)
- Elm (`elm`)
- F# (`f#`; `fsharp`)
- Go (`go`)
- Haskell (`haskell`; `hs`)
- HTML (`html`)
- Java (`java`)
- JavaScript (`javascript`; `js`; `node`)
- JSON (`json`)
- Julia (`julia`; `jl`)
- Kotlin (`kotlin`; `kt`)
- LESS (`less`)
- Markdown (`markdown`; `md`)
- Objective C (`objective-c`; `objectivec`, `objc`)
- PHP (`php`)
- Python (`python`; `py`)
- R (`r`)
- Ruby (`ruby`; `rb`)
- Rust (`rust`; `rs`)
- Scala (`scala`)
- Scheme (`scheme`)
- Shell (`shell`; `sh`; `bash`)
- SparQL (`sparql`)
- SQL (`sql`)
- Swift (`swift`)
- SystemVerilog (`systemverilog`; `sv`)
- Tcl (`tcl`)
- Turtle (`turtle`; `ttl`)
- TypeScript (`typescript`; `ts`)
- Verilog (`verilog`; `v`)
- VHDL (`vhdl`; `vhd`)
- Visual Basic (`vb.net`; `vb`; `visualbasic`)
- XML (`xml`)
- YAML (`yaml`; `yml`)

More languages can be implemented on your request. If you need a specific language, please [refer to the available ones](https://codemirror.net/mode/) and open up an issue on GitHub, so that we know which one we should add!

## Zettlr Markdown additions

In addition to GitHub flavored markdown extensions (marked with "(extension)" in the [spec](https://github.github.com/gfm/)), Zettlr provides the following:

- Support for `<iframe src="https://example.com></iframe>` elements
- Support for `<iframe src="https://example.com"></iframe>` elements

> **Warning**: pages in iframes can get unrestricted access to your local filesystem! 'Frame-busting' techniques can be used by pages to escape the iframe and [interact with the Electron backend directly](https://www.electronjs.org/docs/tutorial/security#isolation-for-untrusted-content) - you should assume any pages in iframes (or an attacker of that page) have access to all of the data on your computer.
> **Warning**: Pages in iframes can get unrestricted access to your local filesystem! 'Frame-busting' techniques can be used by pages to escape the iframe and [interact with the Electron backend directly](https://www.electronjs.org/docs/tutorial/security#isolation-for-untrusted-content) - you should assume any pages in iframes (or an attacker of that page) have access to all of the data on your computer.
- KaTeX equation rendering via either inline (`$`) or fenced (`$$`) blocks: `$x/y$` or

Expand Down
64 changes: 42 additions & 22 deletions docs/en/reference/markdown-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,36 +101,56 @@ Zettlr also supports so-called "fenced code blocks." These are the block-version

Zettlr supports syntax highlighting for several script and programming languages. You have to tell Zettlr explicitly which language to use by simply adding its identifier _directly after the introducing code fence_. So to direct Zettlr to highlight a code fence using a JavaScript interpreter, you would need to begin the code block with three backticks, directly followed by the word "javascript" on an empty line.

Currently, the following languages are supported by the engine (the names in braces are the identifiers you would need to use in Zettlr, as they do not contain special characters, which might upset an engine):

- C (c)
- C# (csharp)
- C++ (cpp)
- CSS (css)
- Go (go)
- Java (java)
- JavaScript (javascript)
- Kotlin (kotlin)
- LESS (less)
- Objective C (objectivec)
- PHP (php)
- Python (python)
- R (r)
- Ruby (ruby)
- SQL (sql)
- Swift (swift)
- Shell/Bash
- YAML (yaml)
Currently, the following languages are supported by the engine (the names in braces are the identifiers you'd need to indicate the language):

- C (`c`)
- C# (`c#`; `csharp`; `cs`)
- C++ ( `c++`; `cpp`)
- Common Lisp (`clisp`; `commonlisp`)
- CSS (`css`)
- Elm (`elm`)
- F# (`f#`; `fsharp`)
- Go (`go`)
- Haskell (`haskell`; `hs`)
- HTML (`html`)
- Java (`java`)
- JavaScript (`javascript`; `js`; `node`)
- JSON (`json`)
- Julia (`julia`; `jl`)
- Kotlin (`kotlin`; `kt`)
- LESS (`less`)
- Markdown (`markdown`; `md`)
- Objective C (`objective-c`; `objectivec`, `objc`)
- PHP (`php`)
- Python (`python`; `py`)
- R (`r`)
- Ruby (`ruby`; `rb`)
- Rust (`rust`; `rs`)
- Scala (`scala`)
- Scheme (`scheme`)
- Shell (`shell`; `sh`; `bash`)
- SparQL (`sparql`)
- SQL (`sql`)
- Swift (`swift`)
- SystemVerilog (`systemverilog`; `sv`)
- Tcl (`tcl`)
- Turtle (`turtle`; `ttl`)
- TypeScript (`typescript`; `ts`)
- Verilog (`verilog`; `v`)
- VHDL (`vhdl`; `vhd`)
- Visual Basic (`vb.net`; `vb`; `visualbasic`)
- XML (`xml`)
- YAML (`yaml`; `yml`)

More languages can be implemented on your request. If you need a specific language, please [refer to the available ones](https://codemirror.net/mode/) and open up an issue on GitHub, so that we know which one we should add!

## Zettlr Markdown additions

In addition to GitHub flavored markdown extensions (marked with "(extension)" in the [spec](https://github.github.com/gfm/)), Zettlr provides the following:

- Support for `<iframe src="https://example.com></iframe>` elements
- Support for `<iframe src="https://example.com"></iframe>` elements

> **Warning**: pages in iframes can get unrestricted access to your local filesystem! 'Frame-busting' techniques can be used by pages to escape the iframe and [interact with the Electron backend directly](https://www.electronjs.org/docs/tutorial/security#isolation-for-untrusted-content) - you should assume any pages in iframes (or an attacker of that page) have access to all of the data on your computer.
> **Warning**: Pages in iframes can get unrestricted access to your local filesystem! 'Frame-busting' techniques can be used by pages to escape the iframe and [interact with the Electron backend directly](https://www.electronjs.org/docs/tutorial/security#isolation-for-untrusted-content) - you should assume any pages in iframes (or an attacker of that page) have access to all of the data on your computer.
- KaTeX equation rendering via either inline (`$`) or fenced (`$$`) blocks: `$x/y$` or

Expand Down
56 changes: 38 additions & 18 deletions docs/fr/reference/markdown-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,44 @@ Zettlr prend en charge la coloration syntaxique pour plusieurs langages de scrip

Actuellement, les langues suivantes sont prises en charge par le moteur (les noms entre parenthèses sont les identifiants que vous devriez utiliser dans Zettlr, car ils ne contiennent pas de caractères spéciaux, ce qui pourrait perturber un moteur) :

- C (c)
- C# (csharp)
- C++ (cpp)
- CSS (css)
- Go (go)
- Java (java)
- JavaScript (javascript)
- Kotlin (kotlin)
- LESS (less)
- Objective C (objectivec)
- PHP (php)
- Python (python)
- R (r)
- Ruby (ruby)
- SQL (sql)
- Swift (swift)
- Shell/Bash
- YAML (yaml)
- C (`c`)
- C# (`c#`; `csharp`; `cs`)
- C++ ( `c++`; `cpp`)
- Common Lisp (`clisp`; `commonlisp`)
- CSS (`css`)
- Elm (`elm`)
- F# (`f#`; `fsharp`)
- Go (`go`)
- Haskell (`haskell`; `hs`)
- HTML (`html`)
- Java (`java`)
- JavaScript (`javascript`; `js`; `node`)
- JSON (`json`)
- Julia (`julia`; `jl`)
- Kotlin (`kotlin`; `kt`)
- LESS (`less`)
- Markdown (`markdown`; `md`)
- Objective C (`objective-c`; `objectivec`, `objc`)
- PHP (`php`)
- Python (`python`; `py`)
- R (`r`)
- Ruby (`ruby`; `rb`)
- Rust (`rust`; `rs`)
- Scala (`scala`)
- Scheme (`scheme`)
- Shell (`shell`; `sh`; `bash`)
- SparQL (`sparql`)
- SQL (`sql`)
- Swift (`swift`)
- SystemVerilog (`systemverilog`; `sv`)
- Tcl (`tcl`)
- Turtle (`turtle`; `ttl`)
- TypeScript (`typescript`; `ts`)
- Verilog (`verilog`; `v`)
- VHDL (`vhdl`; `vhd`)
- Visual Basic (`vb.net`; `vb`; `visualbasic`)
- XML (`xml`)
- YAML (`yaml`; `yml`)

D'autres langues peuvent être mises en œuvre à votre demande. Si vous avez besoin d'une langue spécifique, veuillez [consulter les langues disponibles](https://codemirror.net/mode/) et ouvrir un numéro sur GitHub, afin que nous sachions laquelle nous devons ajouter !

Expand Down
62 changes: 41 additions & 21 deletions docs/it/reference/markdown-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ All'inizio Markdown era solo un piccolo script che John Gruber scrisse per sé s

## Dialetti di Markdown

Ad oggi, coesistono diverse implementazioni della sintassi di Markdown. Le più importanti sono:
Ad oggi, coesistono diverse implementazioni della sintassi di Markdown. Le più importanti sono:

- **MultiMarkdown**: Amplifica la sintassi iniziale per aggiungere le note a piè di pagina, le tabelle, e alcuni dati aggiuntivi (metadata).
- **Markdown Extra**: Di nuovo, aggiunte alla sintassi iniziale.
Expand All @@ -45,7 +45,7 @@ Anche se Markdown può fare un sacco di cose, in questa sezione vogliamo descriv

### Titoli

I titoli sono banali. Devono possedere una riga loro e devono essere segnalate con un cancelletto. Hai a disposizione sei livelli di titoli:
I titoli sono banali. Devono possedere una riga loro e devono essere segnalate con un cancelletto. Hai a disposizione sei livelli di titoli:

- `# Testo titolo` — restituisce un titolo di primo livello
- `## Testo titolo` — restituisce un titolo di secondo livello
Expand All @@ -69,7 +69,7 @@ A volte hai bisogno di enfatizzare un intero paragrafo (per esempio una lunga ci
- crea elementi di un elenco anteponendo per ogni riga il carattere `-`, `*` oppure `+` . Se ti piace puoi anche scambiarli!
- per gli elenchi numerati è necessario anteporre numeri, nel formato `1.`

> **Attenzione**: I numeri _non_ devono essere in ordine. Ad ogni esportazione il convertitore correggerà automaticamente i numeri in una sequenza crescente, per cui ad esempio una lista di numeri 1, 6, 14, 2 sarà convertita nei numeri 1, 2, 3, 4!
> **Attenzione**: I numeri _non_ devono essere in ordine. Ad ogni esportazione il convertitore correggerà automaticamente i numeri in una sequenza crescente, per cui ad esempio una lista di numeri 1, 6, 14, 2 sarà convertita nei numeri 1, 2, 3, 4!
### Collegamenti e immagini

Expand Down Expand Up @@ -103,24 +103,44 @@ Zettlr supporta l'evidenziatura della sintassi per numerosi script e linguaggi d

Al momento, sono supportati i seguenti linguaggi (tra parentesi sono riportati gli identificatori da usare in Zettlr, i quali non contengono caratteri speciali che potrebbero creare problemi all'interpretazione):

- C (c)
- C# (csharp)
- C++ (cpp)
- CSS (css)
- Go (go)
- Java (java)
- JavaScript (javascript)
- Kotlin (kotlin)
- LESS (less)
- Objective C (objectivec)
- PHP (php)
- Python (python)
- R (r)
- Ruby (ruby)
- SQL (sql)
- Swift (swift)
- Shell/Bash
- YAML (yaml)
- C (`c`)
- C# (`c#`; `csharp`; `cs`)
- C++ ( `c++`; `cpp`)
- Common Lisp (`clisp`; `commonlisp`)
- CSS (`css`)
- Elm (`elm`)
- F# (`f#`; `fsharp`)
- Go (`go`)
- Haskell (`haskell`; `hs`)
- HTML (`html`)
- Java (`java`)
- JavaScript (`javascript`; `js`; `node`)
- JSON (`json`)
- Julia (`julia`; `jl`)
- Kotlin (`kotlin`; `kt`)
- LESS (`less`)
- Markdown (`markdown`; `md`)
- Objective C (`objective-c`; `objectivec`, `objc`)
- PHP (`php`)
- Python (`python`; `py`)
- R (`r`)
- Ruby (`ruby`; `rb`)
- Rust (`rust`; `rs`)
- Scala (`scala`)
- Scheme (`scheme`)
- Shell (`shell`; `sh`; `bash`)
- SparQL (`sparql`)
- SQL (`sql`)
- Swift (`swift`)
- SystemVerilog (`systemverilog`; `sv`)
- Tcl (`tcl`)
- Turtle (`turtle`; `ttl`)
- TypeScript (`typescript`; `ts`)
- Verilog (`verilog`; `v`)
- VHDL (`vhdl`; `vhd`)
- Visual Basic (`vb.net`; `vb`; `visualbasic`)
- XML (`xml`)
- YAML (`yaml`; `yml`)

Possono essere implementati più linguaggi di programmazione se lo richiedi. Se hai bisogno di un linguaggio specifico, ti preghiamo di [fare riferimento a quelli disponibili]((https://codemirror.net/mode/) e di aprire una issue su GitHub così da sapere quali aggiungere!

Expand Down
56 changes: 38 additions & 18 deletions docs/ja/reference/markdown-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,44 @@ Zettlrはいくつかのスクリプトとプログラム言語について、

今のところ、以下の言語をサポートしています。(括弧の中はZettlrで使用する識別子です。混乱を防ぐため特殊文字を含まないようにしています。)

- C (c)
- C# (csharp)
- C++ (cpp)
- CSS (css)
- Go (go)
- Java (java)
- JavaScript (javascript)
- Kotlin (kotlin)
- LESS (less)
- Objective C (objectivec)
- PHP (php)
- Python (python)
- R (r)
- Ruby (ruby)
- SQL (sql)
- Swift (swift)
- Shell/Bash
- YAML (yaml)
- C (`c`)
- C# (`c#`; `csharp`; `cs`)
- C++ ( `c++`; `cpp`)
- Common Lisp (`clisp`; `commonlisp`)
- CSS (`css`)
- Elm (`elm`)
- F# (`f#`; `fsharp`)
- Go (`go`)
- Haskell (`haskell`; `hs`)
- HTML (`html`)
- Java (`java`)
- JavaScript (`javascript`; `js`; `node`)
- JSON (`json`)
- Julia (`julia`; `jl`)
- Kotlin (`kotlin`; `kt`)
- LESS (`less`)
- Markdown (`markdown`; `md`)
- Objective C (`objective-c`; `objectivec`, `objc`)
- PHP (`php`)
- Python (`python`; `py`)
- R (`r`)
- Ruby (`ruby`; `rb`)
- Rust (`rust`; `rs`)
- Scala (`scala`)
- Scheme (`scheme`)
- Shell (`shell`; `sh`; `bash`)
- SparQL (`sparql`)
- SQL (`sql`)
- Swift (`swift`)
- SystemVerilog (`systemverilog`; `sv`)
- Tcl (`tcl`)
- Turtle (`turtle`; `ttl`)
- TypeScript (`typescript`; `ts`)
- Verilog (`verilog`; `v`)
- VHDL (`vhdl`; `vhd`)
- Visual Basic (`vb.net`; `vb`; `visualbasic`)
- XML (`xml`)
- YAML (`yaml`; `yml`)

要望に応じて追加の言語を実装します。必要なものがあれば、[利用可能な言語かどうか確認して](https://codemirror.net/mode/)GitHubにイシューをあげて、追加すべきものを知らせてください。

Expand Down

0 comments on commit 5e64283

Please sign in to comment.