From 19849686e13c074e787bae2afdc12a32735eadcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Sun, 18 Sep 2022 14:22:44 +0300 Subject: [PATCH] Updated docs --- DOCUMENTATION.md | 8 ++++++-- README.md | 27 ++++++++++++++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 8bdf1a2..6af08d1 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -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 })] }) -``` \ No newline at end of file +``` + diff --git a/README.md b/README.md index 2834fca..e9fe701 100644 --- a/README.md +++ b/README.md @@ -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
 tag
+        // Whether to add the classes to the 
 tag, default is false
         pre: true
+        // Whether to use hljs' auto language detection, default is true
+    ,   auto_detection: true
     })]
 });
 
@@ -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 })]
+})
+```
+
 
 
 
@@ -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`
@@ -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`