gmunguia / markdown-it-plantuml

:herb: :book: plantuml diagrams in your markdown
MIT License
98 stars 21 forks source link

Online plantuml did not support chinese #3

Closed purocean closed 6 years ago

purocean commented 6 years ago

Can support use local plantuml ? image

gmunguia commented 6 years ago

Hi! Thanks your using this plugin =)

It should be possible to do what you want using the generateSource option:

function customSrcGenerator (umlCode) { 
    return 'http://your-server/plant-uml-generator/' + yourHashFunction(umlCode); 
}

var md = require('markdown-it')()
    .use(require('markdown-it-plantuml'), { generateSource: customSrcGenerator });

Let me know how it goes!