Code Monkey home page Code Monkey logo

markdown-it-plantuml's People

Contributors

fetzi avatar gmunguia avatar timlee1128 avatar yosmoc avatar yuki-takei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

markdown-it-plantuml's Issues

[FEATURE] Get UML name from fragment instead of default from config

This feature request is simple, to make more use out of this plugin we need to have access to the uml name inside the overridable methods for example the generator - currently this is not possible because the uml code passed is also without @startuml and @enduml. The name is defined as follows according to the PlantUML spec:

@startuml {NAME}
A -> B
@enduml

It would be amazing to have this name available so it can be used for example to save the image with a proper name

customGenerator's URL not used

I created a custom generator which returns a custom url for loading the image (this url goes to a local path where plantuml diagrams are generated using node-plantuml) but even though I'm returning a new url when checking the generated source files when building (I'm using VuePress) it still shows the url to the plantuml server... why?

My console.logs in my custom generate source function are being executed...

Handling multi-line closeMarker

What I want to do is like following:

const MarkdownIt = require('markdown-it')
const md = new MarkdownIt()
md.use(require('markdown-it-plantuml'), {
  openMarker: '```puml\n@startuml',
  closeMarker: '@enduml\n```'
})

md.render(`\`\`\`puml
@startuml
Bob -> Alice : hello
@enduml
\`\`\``)

Because Previewing markdown on vscode needs the plantuml description to be enclosed with ```puml and ```.

When running the above sample, markdown-it-plantuml can find openMarker and closeMarker, but fails in moving the cursor after closing.

The simple solution is to rewrite index.js as follows, which will work as expected for me, but I'm not sure if it's the proper way.

135c135
< state.line = nextLine + (autoClosed ? 1 : 0);
---
> state.line = nextLine + (autoClosed ? 1 + closeMarker.match(/\n/g).length : 0);

[FeatureRequest] Add additional diagram types

Hi gmunguia,
it would be great, if your plugin would support also addtional diagram types like JSON Data (@startjson) and YAML Data (@startyaml) or Word Breakdown (@startwbs).

Sadly they have an addional syntax and i would have to copy your branch to support it.

The best place would be your plugin supporting the addtional syntaxes as well, if this would be easily possible for you.

Thanks for creating this heavily used plugin.

Best Regards
Holger

export PDF

Wenn using the preview panel you need following tags to see the plantuml

````plantuml
[someNiceUML]

for the PDF export you need
@startuml
[someNiceUML]
@enduml

is there a way to print/see the UML in both not in either the preview or the export

enable setting server option from VS Code when used as extension by Markdown PDF extension

The example shows how to set options from javascript, but this is an awesome extension for VS Code using Markdown PDF extension. It would be great to be able to set a setting for this extension so it could direct to a private PlantUML server. I have to export to HTML, replace all URLs, and then print to PDF at the moment as a work around. In addition, the ability to strip the "/plantuml" from the url would be great. This would allow easy use with plantuml docker images as shown in the following examples:

docker: docker run -d -p 8080:8080 plantuml/plantuml-server:tomcat
currently generated: "http://www.plantuml.com/plantuml/svg/---sensitive---"
desired generated: "http://localhost:8080/svg/---sensitive---"

Failed to minify

With create-react-app default build script, it tries to uglify the dependencies got the following error:

$ react-scripts build
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

 	./node_modules/markdown-it-plantuml/lib/deflate.js:6

Read more here: http://bit.ly/2tRViJ9

URI path issue in preview

Hello,

I added vscode links in plantuml code like this:

[[vscode://file/C:/... (full link name)... text]]

While the generated HTML worked properly, the preview link is not correct. It seems to be adding an extra current path to the front of the absolute URI file path.

Thank you.

Make plantuml server url configurable

In case I would like to use a private instance of a plantuml server, I would like to be able to configure the markdown plugin to use a custom URL.

Support for inline SVG

Thanks so much for creating this markdown-it plugin!

Would it be feasible to add support for inline SVG? This would allow authors to style the SVG using CSS to match the branding of their site.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.