Add plantuml support

Signed-off-by: Chulki Lee <chulki.lee@gmail.com>
This commit is contained in:
Chulki Lee 2018-12-12 00:36:54 -08:00
parent cd71a0a989
commit 1d7895c869
7 changed files with 20 additions and 1 deletions

View File

@ -122,6 +122,10 @@
{ {
"connectionString": "change this", "connectionString": "change this",
"container": "change this" "container": "change this"
},
"plantuml":
{
"server": "http://www.plantuml.com/plantuml"
} }
} }
} }

View File

@ -126,6 +126,9 @@ module.exports = {
email: process.env.CMD_SAML_ATTRIBUTE_EMAIL email: process.env.CMD_SAML_ATTRIBUTE_EMAIL
} }
}, },
plantuml: {
server: process.env.CMD_PLANTUML_SERVER
},
email: toBooleanConfig(process.env.CMD_EMAIL), email: toBooleanConfig(process.env.CMD_EMAIL),
allowEmailRegister: toBooleanConfig(process.env.CMD_ALLOW_EMAIL_REGISTER), allowEmailRegister: toBooleanConfig(process.env.CMD_ALLOW_EMAIL_REGISTER),
allowGravatar: toBooleanConfig(process.env.CMD_ALLOW_GRAVATAR), allowGravatar: toBooleanConfig(process.env.CMD_ALLOW_GRAVATAR),

View File

@ -97,6 +97,7 @@ statusRouter.get('/config', function (req, res) {
urlpath: config.urlPath, urlpath: config.urlPath,
debug: config.debug, debug: config.debug,
version: config.fullversion, version: config.fullversion,
plantumlServer: config.plantuml.server,
DROPBOX_APP_KEY: config.dropbox.appKey, DROPBOX_APP_KEY: config.dropbox.appKey,
allowedUploadMimeTypes: config.allowedUploadMimeTypes allowedUploadMimeTypes: config.allowedUploadMimeTypes
} }

View File

@ -90,6 +90,7 @@
"markdown-it-ins": "~2.0.0", "markdown-it-ins": "~2.0.0",
"markdown-it-mark": "~2.0.0", "markdown-it-mark": "~2.0.0",
"markdown-it-mathjax": "~2.0.0", "markdown-it-mathjax": "~2.0.0",
"markdown-it-plantuml": "^1.4.1",
"markdown-it-regexp": "~0.4.0", "markdown-it-regexp": "~0.4.0",
"markdown-it-sub": "~1.0.0", "markdown-it-sub": "~1.0.0",
"markdown-it-sup": "~1.0.0", "markdown-it-sup": "~1.0.0",

View File

@ -1,5 +1,5 @@
/* eslint-env browser, jquery */ /* eslint-env browser, jquery */
/* global moment, serverurl */ /* global moment, serverurl, plantumlServer */
import Prism from 'prismjs' import Prism from 'prismjs'
import hljs from 'highlight.js' import hljs from 'highlight.js'
@ -970,6 +970,10 @@ md.use(require('markdown-it-emoji'), {
shortcuts: {} shortcuts: {}
}) })
md.use(require('markdown-it-plantuml'), {
server: plantumlServer
})
window.emojify.setConfig({ window.emojify.setConfig({
blacklist: { blacklist: {
elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'], elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'],

View File

@ -2,6 +2,7 @@ window.domain = '<%- domain %>'
window.urlpath = '<%- urlpath %>' window.urlpath = '<%- urlpath %>'
window.debug = <%- debug %> window.debug = <%- debug %>
window.version = '<%- version %>' window.version = '<%- version %>'
window.plantumlServer = '<%- plantumlServer %>'
window.allowedUploadMimeTypes = <%- JSON.stringify(allowedUploadMimeTypes) %> window.allowedUploadMimeTypes = <%- JSON.stringify(allowedUploadMimeTypes) %>

View File

@ -7898,6 +7898,11 @@ markdown-it-mathjax@~2.0.0:
resolved "https://registry.yarnpkg.com/markdown-it-mathjax/-/markdown-it-mathjax-2.0.0.tgz#ae2b4f4c5c719a03f9e475c664f7b2685231d9e9" resolved "https://registry.yarnpkg.com/markdown-it-mathjax/-/markdown-it-mathjax-2.0.0.tgz#ae2b4f4c5c719a03f9e475c664f7b2685231d9e9"
integrity sha1-ritPTFxxmgP55HXGZPeyaFIx2ek= integrity sha1-ritPTFxxmgP55HXGZPeyaFIx2ek=
markdown-it-plantuml@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/markdown-it-plantuml/-/markdown-it-plantuml-1.4.1.tgz#3bd5e7d92eaa5c6c68eb29802f7b46a8e05ca998"
integrity sha512-13KgnZaGYTHBp4iUmGofzZSBz+Zj6cyqfR0SXUIc9wgWTto5Xhn7NjaXYxY0z7uBeTUMlc9LMQq5uP4OM5xCHg==
markdown-it-regexp@~0.4.0: markdown-it-regexp@~0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.yarnpkg.com/markdown-it-regexp/-/markdown-it-regexp-0.4.0.tgz#d64d713eecec55ce4cfdeb321750ecc099e2c2dc" resolved "https://registry.yarnpkg.com/markdown-it-regexp/-/markdown-it-regexp-0.4.0.tgz#d64d713eecec55ce4cfdeb321750ecc099e2c2dc"