uml

package module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 8 Imported by: 1

README

goldmark-plantuml

Sync to Gitee w orkflow state codecov version

goldmark-plantuml is an extension for goldmark.

You can plantuml to build svg image in your markdown like mume

screenshot

There are two demo(using ' instead of ′ in the code block)

  1. default config

Demo1 Output1

'''go
package main

import ()

func main(){}
'''

'''plantuml
@startuml
Alice -> Bob: test
@enduml
'''

  1. using plantuml-svg and goldmark-highlighting extension

Demo2 Output2

'''go
package main

import ()

func main(){}
'''

'''plantuml-svg
@startuml
Alice -> Bob: test
@enduml
'''

Installation

go get -u github.com/OhYee/goldmark-plantuml

License

MIT

Documentation

Overview

Package uml is a extension for the goldmark(http://github.com/yuin/goldmark).

This extension adds svg picture output from uml language using go-plantuml(https://github.com/OhYee/go-plantuml).

Index

Constants

This section is empty.

Variables

View Source
var Default = NewUMLExtension(50, "plantuml")

Default uml extension when there is no other fencedCodeBlock goldmark render extensions

Functions

func NewUMLExtension

func NewUMLExtension(length int, languages ...string) goldmark.Extender

NewUMLExtension return the goldmark.Extender

func RenderMap

func RenderMap(length int, languages ...string) ext.RenderMap

RenderMap return the goldmark-fenced_codeblock_extension.RenderMap

Types

type UML

type UML struct {
	Languages []string

	MaxLength int
	// contains filtered or unexported fields
}

UML render struct

func NewUML

func NewUML(length int, languages ...string) *UML

NewUML initial a UML struct

func (*UML) Renderer

func (u *UML) Renderer(w util.BufWriter, source []byte, node ast.Node, entering bool) (ast.WalkStatus, error)

Renderer render function

Directories

Path Synopsis
demo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL