obsidian-sandbox-vault/Formatting/Code block.md

671 B

Syntax highlight is supported with the language specified after the first set of backticks. We use prismjs for syntax highlighting, a list of supported languages can be found at their site

```js
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
```
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}
    Text indented with a tab is formatted like this, and will also look like a code block in preview. 
Text indented with a tab is formatted like this, and will also look like a code block in preview.