Markdown and syntax highlighting

Naninovel-related news and updates.
Post Reply
User avatar
Elringus
Admin
Posts: 319
Joined: 11 May 2020 18:03

Markdown and syntax highlighting

Post by Elringus »

It's now possible to use markdown when posting on this forum; it allows to format the text, insert links, images, quotes, tables and code snippets in a simpler way, compared to bbcodes. Find more info and examples on the help page: app.php/help/markdown

We've also added syntax highlighting for naninovel script snippets:

Code: Select all

# Start

Select an action.[skipInput]

@choice "Pick up sword" if:!ItemExist("Sword") do:"@addItem Sword, @goto .Adventure"
@choice "Pick up armor" if:!ItemExist("Armor") do:"@addItem Armor, @goto .Adventure"
@choice "Adventure awaits, venture forth!"
@stop

In order for this to work, add ```nani before the script text and ``` after, eg:

Code: Select all

```nani
Script text. 
```

It's also possible to highlight other code this way, eg for C#:

Code: Select all

```csharp
var foo = Bar();
```

— will result in:

Code: Select all

var foo = Bar();

All the naninovel script snippets in the online documentation are now highlighted as well.

Post Reply