dot

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-dot

Sync to Gitee w orkflow state codecov version

goldmark-dot is an extension for goldmark.

You can dot language 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(){}
'''

'''dot
digraph{a->b}
'''

  1. using dot-svg and goldmark-highlighting extension

Demo2 Output2

'''go
package main

import ()

func main(){}
'''

'''dot-svg
digraph{a->b}
'''

Installation

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

License

MIT

Documentation

Overview

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

This extension adds svg picture output from dot language using godot(https://github.com/OhYee/godot).

Index

Constants

This section is empty.

Variables

View Source
var Default = NewDotExtension(20, "dot")

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

Functions

func NewDotExtension

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

NewDotExtension return the goldmark.Extender

func RenderMap

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

RenderMap return the goldmark-fenced_codeblock_extension.RenderMap

Types

type Dot

type Dot struct {
	Languages []string

	MaxLength int
	// contains filtered or unexported fields
}

Dot render struct

func NewDot

func NewDot(length int, languages ...string) *Dot

NewDot initial a Dot struct

func (*Dot) Renderer

func (d *Dot) 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