Skip to content

Commit 1d7895c

Browse files
committed
Add plantuml support
Signed-off-by: Chulki Lee <chulki.lee@gmail.com>
1 parent cd71a0a commit 1d7895c

File tree

7 files changed

+20
-1
lines changed

7 files changed

+20
-1
lines changed

config.json.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@
122122
{
123123
"connectionString": "change this",
124124
"container": "change this"
125+
},
126+
"plantuml":
127+
{
128+
"server": "http://www.plantuml.com/plantuml"
125129
}
126130
}
127131
}

lib/config/environment.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ module.exports = {
126126
email: process.env.CMD_SAML_ATTRIBUTE_EMAIL
127127
}
128128
},
129+
plantuml: {
130+
server: process.env.CMD_PLANTUML_SERVER
131+
},
129132
email: toBooleanConfig(process.env.CMD_EMAIL),
130133
allowEmailRegister: toBooleanConfig(process.env.CMD_ALLOW_EMAIL_REGISTER),
131134
allowGravatar: toBooleanConfig(process.env.CMD_ALLOW_GRAVATAR),

lib/web/statusRouter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ statusRouter.get('/config', function (req, res) {
9797
urlpath: config.urlPath,
9898
debug: config.debug,
9999
version: config.fullversion,
100+
plantumlServer: config.plantuml.server,
100101
DROPBOX_APP_KEY: config.dropbox.appKey,
101102
allowedUploadMimeTypes: config.allowedUploadMimeTypes
102103
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"markdown-it-ins": "~2.0.0",
9191
"markdown-it-mark": "~2.0.0",
9292
"markdown-it-mathjax": "~2.0.0",
93+
"markdown-it-plantuml": "^1.4.1",
9394
"markdown-it-regexp": "~0.4.0",
9495
"markdown-it-sub": "~1.0.0",
9596
"markdown-it-sup": "~1.0.0",

public/js/extra.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-env browser, jquery */
2-
/* global moment, serverurl */
2+
/* global moment, serverurl, plantumlServer */
33

44
import Prism from 'prismjs'
55
import hljs from 'highlight.js'
@@ -970,6 +970,10 @@ md.use(require('markdown-it-emoji'), {
970970
shortcuts: {}
971971
})
972972

973+
md.use(require('markdown-it-plantuml'), {
974+
server: plantumlServer
975+
})
976+
973977
window.emojify.setConfig({
974978
blacklist: {
975979
elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'],

public/js/lib/common/constant.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ window.domain = '<%- domain %>'
22
window.urlpath = '<%- urlpath %>'
33
window.debug = <%- debug %>
44
window.version = '<%- version %>'
5+
window.plantumlServer = '<%- plantumlServer %>'
56

67
window.allowedUploadMimeTypes = <%- JSON.stringify(allowedUploadMimeTypes) %>
78

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7898,6 +7898,11 @@ markdown-it-mathjax@~2.0.0:
78987898
resolved "https://registry.yarnpkg.com/markdown-it-mathjax/-/markdown-it-mathjax-2.0.0.tgz#ae2b4f4c5c719a03f9e475c664f7b2685231d9e9"
78997899
integrity sha1-ritPTFxxmgP55HXGZPeyaFIx2ek=
79007900

7901+
markdown-it-plantuml@^1.4.1:
7902+
version "1.4.1"
7903+
resolved "https://registry.yarnpkg.com/markdown-it-plantuml/-/markdown-it-plantuml-1.4.1.tgz#3bd5e7d92eaa5c6c68eb29802f7b46a8e05ca998"
7904+
integrity sha512-13KgnZaGYTHBp4iUmGofzZSBz+Zj6cyqfR0SXUIc9wgWTto5Xhn7NjaXYxY0z7uBeTUMlc9LMQq5uP4OM5xCHg==
7905+
79017906
markdown-it-regexp@~0.4.0:
79027907
version "0.4.0"
79037908
resolved "https://registry.yarnpkg.com/markdown-it-regexp/-/markdown-it-regexp-0.4.0.tgz#d64d713eecec55ce4cfdeb321750ecc099e2c2dc"

0 commit comments

Comments
 (0)