Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update multimd-table and enable options #1586

Merged
merged 2 commits into from May 27, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Some generated files are not rendered by default. Learn more.

@@ -117,7 +117,7 @@
"markdown-it-ins": "^2.0.0",
"markdown-it-katex": "^2.0.3",
"markdown-it-mark": "^2.0.0",
"markdown-it-multimd-table": "^3.1.3",
"markdown-it-multimd-table": "^3.2.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-toc-done-right": "^3.0.1",
@@ -21,6 +21,7 @@ const setupLinkify = require('./MdToHtml/setupLinkify');
const hljs = require('highlight.js');
const markdownItAnchor = require('markdown-it-anchor');
const markdownItToc = require('markdown-it-toc-done-right');
const markdownItMultiMd = require('markdown-it-multimd-table');
This conversation was marked as resolved by tessus

This comment has been minimized.

Copy link
@tessus

tessus May 27, 2019

Collaborator

This should still be in the plugins section. any reason why you pulled it out of there?

This comment has been minimized.

Copy link
@tessus

tessus May 27, 2019

Collaborator

Never mind. My bad

This comment has been minimized.

Copy link
@CalebJohn

CalebJohn May 27, 2019

Author Contributor

The plugins section is only for plugins that don't have options. But since there are 2 plugins that require this special treatment, I'll update so everything can go in plugins.

This comment has been minimized.

Copy link
@tessus

tessus May 27, 2019

Collaborator

No, it's fine. I made a mistake. Same was done for toc.

This comment has been minimized.

Copy link
@CalebJohn

CalebJohn May 27, 2019

Author Contributor

I missed you comment, I've already changed it. I think this is a positive change since things will be more standard for future development.

This comment has been minimized.

Copy link
@tessus

tessus May 27, 2019

Collaborator

It definitely is. I just didn't want to create more work for you.

// The keys must match the corresponding entry in Setting.js
const plugins = {
mark: require('markdown-it-mark'),
@@ -31,7 +32,6 @@ const plugins = {
abbr: require('markdown-it-abbr'),
emoji: require('markdown-it-emoji'),
insert: require('markdown-it-ins'),
multitable: require('markdown-it-multimd-table'),
};

class MdToHtml {
@@ -131,6 +131,8 @@ class MdToHtml {
markdownIt.use(markdownItAnchor)
if (Setting.value('markdown.plugin.toc'))
markdownIt.use(markdownItToc, { listType: 'ul' })
if (Setting.value('markdown.plugin.multitable'))
markdownIt.use(markdownItMultiMd, { enableMultilineRows: true, enableRowspan: true })

for (let key in plugins) {
if (Setting.value('markdown.plugin.' + key))
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.