You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Desktop: Added support for Fountain screenwriting language
This commit is contained in:
@ -11,6 +11,7 @@ const rules = {
|
||||
html_image: require('./MdToHtml/rules/html_image'),
|
||||
highlight_keywords: require('./MdToHtml/rules/highlight_keywords'),
|
||||
code_inline: require('./MdToHtml/rules/code_inline'),
|
||||
fountain: require('./MdToHtml/rules/fountain'),
|
||||
};
|
||||
const setupLinkify = require('./MdToHtml/setupLinkify');
|
||||
const hljs = require('highlight.js');
|
||||
@ -69,6 +70,8 @@ class MdToHtml {
|
||||
assetLoaders: {},
|
||||
};
|
||||
|
||||
const ruleOptions = Object.assign({}, options, { resourceBaseUrl: this.resourceBaseUrl_ });
|
||||
|
||||
const markdownIt = new MarkdownIt({
|
||||
breaks: breaks_,
|
||||
linkify: true,
|
||||
@ -103,8 +106,6 @@ class MdToHtml {
|
||||
},
|
||||
});
|
||||
|
||||
const ruleOptions = Object.assign({}, options, { resourceBaseUrl: this.resourceBaseUrl_ });
|
||||
|
||||
// To add a plugin, there are three options:
|
||||
//
|
||||
// 1. If the plugin does not need any application specific data, use the standard way:
|
||||
@ -138,6 +139,7 @@ class MdToHtml {
|
||||
markdownIt.use(rules.link_open(context, ruleOptions));
|
||||
markdownIt.use(rules.html_image(context, ruleOptions));
|
||||
if (Setting.value('markdown.plugin.katex')) markdownIt.use(rules.katex(context, ruleOptions));
|
||||
if (Setting.value('markdown.plugin.fountain')) markdownIt.use(rules.fountain(context, ruleOptions));
|
||||
markdownIt.use(rules.highlight_keywords(context, ruleOptions));
|
||||
markdownIt.use(rules.code_inline(context, ruleOptions));
|
||||
markdownIt.use(markdownItAnchor);
|
||||
|
Reference in New Issue
Block a user