Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert Markdown to HTML.
Headers:
# This is a H1 header ## This is a H2 header ### This is a H3 header #### This is a H4 header ##### This is a H5 header ###### This is a H6 header
Text style ('*' may be replaced by '_'):
*Italic text* **Bold text** ***Bold and italic text*** ~~Strikethrough text~~
Link and image:
[Example link](https://example.org) ![Alt text](https://example.org/image.png)
Autolink:
admin@example.org http://example.org https://example.org ftp://ftp.mozilla.org irc://irc.debian.org/debian
Code:
`Code quote` ``` go doc go tool dist list go help build ```
Unordered list ('-' may be replaced by '+' or '*'):
- level 1
- level 1
- level 2
- level 2 ^^^^ (4 spaces)
Numbered list:
- level 1
- level 1
- level 2
- level 2 ^^^^ (4 spaces)
Example ¶
package main import ( "fmt" "github.com/lcomrade/md2html" ) func main() { result := md2html.Convert(` # Header H1 ## Header H2 ### Header H3 #### Header H4 ##### Header H5 ###### Header H6 - *Italic* and _Italic_ - **Bold** and __Bold__ - ~~Strikethrough~~ [Example link](https://example.org) 1. level 1 2. level 1 1. level 2 2. level 2 `) fmt.Println(result) }
Output:
func ConvertFile ¶
Reads a file from the disk and converts it using 'Convert' function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.