Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions docs/extend-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@ Run `Markdown Preview Enhanced: Extend Parser (Global)` or `Markdown Preview Enh

```javascript
({
/**
* Hook to modify the Markdown code before it is parsed.
*
* @param {String} markdown The original Markdown code.
* @returns {String} The modified Markdown code.
*/
onWillParseMarkdown: async function(markdown) {
return markdown;
},

/**
* Hook to modify the HTML output of the parser.
*
* @param {String} html The HTML code returned by the parser.
* @returns {String} The modified HTML code.
*/
onDidParseMarkdown: async function(html) {
return html;
},

onWillTransformMarkdown: async function(markdown) {
return markdown;
},

onDidTransformMarkdown: async function(markdown) {
return markdown;
},
});
```

Expand Down