Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Sep 18, 2022
1 parent a02528b commit 1984968
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
8 changes: 6 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ let converter = new showdown.Converter({
})
```

If you want to disable language [auto detection](https://highlightjs.org/usage/) feature of hljs, change `auto_detection` flag as `false`. With this option turned off, `showdown-highlight` will not process any codeblocks with no language specified.
If you want to disable language [auto detection](https://highlightjs.org/usage/)
feature of hljs, change `auto_detection` flag as `false`. With this option
turned off, `showdown-highlight` will not process any codeblocks with no
language specified.

```js
let converter = new showdown.Converter({
extensions: [showdownHighlight({ auto_detection: false })]
})
```
```

27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ const showdown = require('showdown')
let converter = new showdown.Converter({
// That's it
extensions: [showdownHighlight({
// Whether to add the classes to the <pre> tag
// Whether to add the classes to the <pre> tag, default is false
pre: true
// Whether to use hljs' auto language detection, default is true
, auto_detection: true
})]
});

Expand Down Expand Up @@ -158,6 +160,17 @@ let converter = new showdown.Converter({
})
```

If you want to disable language [auto detection](https://highlightjs.org/usage/)
feature of hljs, change `auto_detection` flag as `false`. With this option
turned off, `showdown-highlight` will not process any codeblocks with no
language specified.

```js
let converter = new showdown.Converter({
extensions: [showdownHighlight({ auto_detection: false })]
})
```




Expand Down Expand Up @@ -198,8 +211,8 @@ If you are using this library in one of your projects, add it in this list. :spa
- `md-toy-blog`
- `@kev_nz/publisher`
- `@etermind/alex`
- `@web-native-js/chtml-cli`
- `@siradoc/siradoc`
- `@web-native-js/chtml-cli`
- `swanky`
- `md-srv`
- `docset-tools-markdown`
Expand All @@ -209,15 +222,15 @@ If you are using this library in one of your projects, add it in this list. :spa
- `trumpdoc`
- `@peersky/next-web3-chakra`
- `mdpdf_jm`
- `textbase`
- `teroshdl`
- `showdown-html`
- `busi-ui`
- `md-browse`
- `markdown2dash`
- `textbase`
- `showdown-html`
- `teroshdl`
- `tutors-html`
- `tutors-html-beta`
- `tutors-reader-lib`
- `tutors-html-beta`
- `tutors-html`
- `examma-ray`
- `steelsky`
- `chimpsky`
Expand Down

0 comments on commit 1984968

Please sign in to comment.