JSPM

@interrogate/remark-plugin-plantuml

1.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 155
  • Score
    100M100P100Q77292F
  • License MIT

Package Exports

  • @interrogate/remark-plugin-plantuml

Readme

@interrogate/remark-plugin-plantuml

NPM version License: MIT

Process PlantUML diagrams in markdown with Remark.

Quick reference

Installation

npm install @interrogate/remark-plugin-plantuml

What is this?

A Remark plugin that processes PlantUML code blocks in markdown and attaches diagram data as additional properties. It's designed to work with @interrogate/rehype-plugin-plantuml to generate the final HTML output.

When should I use this?

  • When you need to include PlantUML diagrams in your markdown documentation
  • When you're processing PlantUML syntax during the markdown transformation phase
  • When generating documentation with PlantUML diagrams (e.g., in Docusaurus)
  • As part of a complete markdown-to-HTML pipeline using Remark and Rehype

Usage

Basic usage with unified:

import remarkPlantuml from "@interrogate/remark-plugin-plantuml"
import { unified } from "unified"
import remarkParse from "remark-parse"
import remarkRehype from "remark-rehype"

const processor = unified().use(remarkParse).use(remarkPlantuml).use(remarkRehype)

Example: Inline PlantUML

Here's a sequence diagram:

```plantuml
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi there
@enduml
```

### Example: External PlantUML Files

```markdown
![Sequence Diagram](./path/to/diagram.puml)

API

remarkPlantuml([options])

Transform PlantUML code blocks in markdown and attach diagram data as properties for consumption by rehype plugins. Options documentation coming soon.

License

MIT © James Lafferty