Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 760 Bytes

DOCUMENTATION.md

File metadata and controls

34 lines (25 loc) · 760 Bytes

Documentation

You can see below the API reference of this module.

showdownHighlight()

Highlight the code in the showdown input.

Examples:

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

Enable the classes in the <pre> element:

let converter = new showdown.Converter({
    extensions: [showdownHighlight({ pre: true })]
})

If you want to disable language auto detection 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.

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