diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index ef07ee0..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,90 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/alecthomas/chroma" - packages = [ - ".", - "formatters/html", - "lexers", - "lexers/a", - "lexers/b", - "lexers/c", - "lexers/d", - "lexers/e", - "lexers/f", - "lexers/g", - "lexers/h", - "lexers/i", - "lexers/internal", - "lexers/j", - "lexers/k", - "lexers/l", - "lexers/m", - "lexers/n", - "lexers/o", - "lexers/p", - "lexers/q", - "lexers/r", - "lexers/s", - "lexers/t", - "lexers/v", - "lexers/w", - "lexers/x", - "lexers/y", - "styles" - ] - revision = "3020e2ea8c6b1a9c2336022d847c4392c3997f02" - version = "v0.4.0" - -[[projects]] - branch = "master" - name = "github.com/danwakefield/fnmatch" - packages = ["."] - revision = "cbb64ac3d964b81592e64f957ad53df015803288" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/dlclark/regexp2" - packages = [ - ".", - "syntax" - ] - revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957" - version = "v1.1.6" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/shurcooL/sanitized_anchor_name" - packages = ["."] - revision = "86672fcb3f950f35f2e675df2240550f2a50762f" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" - version = "v1.2.2" - -[[projects]] - name = "gopkg.in/russross/blackfriday.v2" - packages = ["."] - revision = "cadec560ec52d93835bf2f15bd794700d3a2473b" - version = "v2.0.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "c2b066a03bec3385904077c618c1b65d91f1e3862993969baa8847f34c91a1a1" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 40dcdef..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,42 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/alecthomas/chroma" - version = "0.4.0" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.1" - -[[constraint]] - name = "gopkg.in/russross/blackfriday.v2" - version = "2.0.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/README.md b/README.md index 840b745..807754e 100644 --- a/README.md +++ b/README.md @@ -19,21 +19,13 @@ a [Blackfriday](https://github.com/russross/blackfriday) renderer. ## Install and prerequisites This project requires and uses the `v2` version of -[Blackfriday](https://github.com/russross/blackfriday/tree/v2). After -[this issue](https://github.com/Depado/bfchroma/issues/3) I decided to rollback -to the `gopkg.in` version so the lib can be go gettable. +[Blackfriday](https://github.com/russross/blackfriday/tree/v2). ``` $ go get -u github.com/Depado/bfchroma ``` -You can also install it directly by using dep in your project: - -``` -$ dep ensure -add github.com/Depado/bfchroma -``` - -_Additionnaly, this project uses the module approach of go 1.11_ +_This project uses the module approach of go 1.11_ ## Features @@ -111,7 +103,7 @@ import ( "github.com/Depado/bfchroma" - bf "gopkg.in/russross/blackfriday.v2" + bf "github.com/russross/blackfriday/v2" ) var md = "This is some sample code.\n\n```go\n" + @@ -149,7 +141,7 @@ package main import ( "github.com/Depado/bfchroma" "github.com/alecthomas/chroma/formatters/html" - bf "github.com/russross/blackfriday" + bf "github.com/russross/blackfriday/v2" ) // Defines the extensions that are used @@ -212,4 +204,4 @@ bf.Run(input, bf.WithRenderer(r), bf.WithExtensions(exts)) ``` This way, you can pass your `css` var to any template and render it along the -rendered markdown. \ No newline at end of file +rendered markdown. diff --git a/example/main.go b/example/main.go index 7398040..4360f1a 100644 --- a/example/main.go +++ b/example/main.go @@ -6,7 +6,7 @@ import ( "github.com/Depado/bfchroma" "github.com/alecthomas/chroma/formatters/html" - bf "gopkg.in/russross/blackfriday.v2" + bf "github.com/russross/blackfriday/v2" ) var md = "This is some sample code.\n\n```go\n" + diff --git a/go.mod b/go.mod index 872bb83..67ae40a 100644 --- a/go.mod +++ b/go.mod @@ -10,11 +10,9 @@ require ( github.com/dlclark/regexp2 v1.1.6 // indirect github.com/mattn/go-isatty v0.0.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday/v2 v2.0.1 github.com/sergi/go-diff v1.0.0 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/stretchr/testify v1.2.2 golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8 // indirect - gopkg.in/russross/blackfriday.v2 v2.0.1 ) - -replace gopkg.in/russross/blackfriday.v2 => github.com/russross/blackfriday/v2 v2.0.1 diff --git a/renderer.go b/renderer.go index 4101b98..7cc5d72 100644 --- a/renderer.go +++ b/renderer.go @@ -9,7 +9,7 @@ import ( "github.com/alecthomas/chroma/formatters/html" "github.com/alecthomas/chroma/lexers" "github.com/alecthomas/chroma/styles" - bf "gopkg.in/russross/blackfriday.v2" + bf "github.com/russross/blackfriday/v2" ) // Option defines the functional option type diff --git a/renderer_test.go b/renderer_test.go index 96aa244..765eae0 100644 --- a/renderer_test.go +++ b/renderer_test.go @@ -9,7 +9,7 @@ import ( "github.com/alecthomas/chroma/formatters/html" "github.com/alecthomas/chroma/styles" "github.com/stretchr/testify/assert" - bf "gopkg.in/russross/blackfriday.v2" + bf "github.com/russross/blackfriday/v2" ) func TestExtend(t *testing.T) {