Skip to content

XhinLiang/markdown-it-plantuml-ex

Repository files navigation

markdown-it-plantuml-ex

npm version CI CircleCI build

Plugin for creating block-level UML diagrams in markdown-it using an offline plantuml.jar.

Compared to markdown-it-plantuml, this plugin renders diagrams locally.

  • Diagram source stays local and is not sent to an external rendering service.
  • Rendering runs against your local Java + PlantUML runtime.
  • Java is required on the machine where markdown is rendered.

Requirements

  • Node.js 20+
  • Java installed and available on PATH

UML example

```plantuml
@startuml
Bob -> Alice : hello
@enduml
```

See plantuml.com for diagram syntax details.

Installation

npm install markdown-it-plantuml-ex

Usage

const md = require('markdown-it')().use(require('markdown-it-plantuml-ex'));

With custom markers:

const md = require('markdown-it')().use(require('markdown-it-plantuml-ex'), {
  openMarker: '```plantuml',
  closeMarker: '```',
});

Development

npm ci
npm run verify

Useful scripts:

  • npm run format - format repository files with Prettier
  • npm run format:check - verify formatting
  • npm run lint - run ESLint
  • npm run lint:fix - auto-fix lint issues
  • npm test - run test suite
  • npm run verify - run format check, lint, and tests

License

MIT

About

A markdown-it plugin which can render PlantUML via a offline plantuml.jar.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors