refactor: fix line after merged develop

Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
BoHong Li 2019-08-04 23:52:06 +08:00
parent 1ebf9ca374
commit ff124ab6bf
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
2 changed files with 7 additions and 7 deletions

View File

@ -91,7 +91,7 @@ UserRouter.get('/me/export', function (req, res) {
}).then(function (notes) {
const filenames = {}
async.each(notes, function (note, callback) {
let basename = note.title.replace(/\//g, '-') // Prevent subdirectories
const basename = note.title.replace(/\//g, '-') // Prevent subdirectories
let filename
let suffix = 0
do {

View File

@ -1061,26 +1061,26 @@ md.renderer.rules.fence = (tokens, idx, options, env, self) => {
}
const makePlantumlURL = (umlCode) => {
let format = 'svg'
let code = plantumlEncoder.encode(umlCode)
const format = 'svg'
const code = plantumlEncoder.encode(umlCode)
return `${plantumlServer}/${format}/${code}`
}
// https://github.com/qjebbs/vscode-plantuml/tree/master/src/markdown-it-plantuml
md.renderer.rules.plantuml = (tokens, idx) => {
let token = tokens[idx]
const token = tokens[idx]
if (token.type !== 'plantuml') {
return tokens[idx].content
}
let url = makePlantumlURL(token.content)
const url = makePlantumlURL(token.content)
return `<img src="${url}" />`
}
// https://github.com/qjebbs/vscode-plantuml/tree/master/src/markdown-it-plantuml
md.core.ruler.push('plantuml', (state) => {
let blockTokens = state.tokens
for (let blockToken of blockTokens) {
const blockTokens = state.tokens
for (const blockToken of blockTokens) {
if (blockToken.type === 'fence' && blockToken.info === 'plantuml') {
blockToken.type = 'plantuml'
}