From db85fee1906d6d3f940834281d9d022a6c3eadeb Mon Sep 17 00:00:00 2001 From: Krzysztof Kowalczyk Date: Fri, 26 Jan 2018 04:08:27 -0800 Subject: [PATCH] tweak readme --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 01bf687..5d57f6f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Markdown [![Build Status](https://travis-ci.org/gomarkdown/markdown.svg?branch=master)](https://travis-ci.org/gomarkdown/markdown) =========== -This package is a [Markdown][1] parser and HTML renderer implemented in [Go][2]. +Package markdown is a [Markdown][1] parser and HTML renderer implemented in [Go][2]. It's fast and supports common extensions. @@ -9,20 +9,22 @@ Installation ------------ To install the library: + go get github.com/gomarkdown/markdown +Docs: https://godoc.org/github.com/gomarkdown/markdown + Usage ----- -For the most sensible markdown processing, it is as simple as getting your input -into a byte slice and calling: +To convert input `[]byte` slice to HTML using reasonable defaults, do: ```go output := markdown.ToHTML(input, nil, nil) ``` -This parser the input using most common parser extensions and renders with -HTMLRenderer (also in most common configuration). +This will parse the input using most common parser extensions and render with +`HTMLRenderer` (also in most common configuration). To parse without any extensions: ```go @@ -48,7 +50,7 @@ maybeUnsafeHTML := markdown.ToHTML(input, nil, nil) html := bluemonday.UGCPolicy().SanitizeBytes(maybeUnsafeHTML) ``` -### Custom options +### Customizing parser and renderer Ways to customize parser: * use custom extensions by creating parser with `markdown.NewParserWithExtensions(extensions)`