diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d70cd0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +test.html \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2b75f67 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,18 @@ +[submodule "vendor/gopkg.in/russross/blackfriday.v2"] + path = vendor/gopkg.in/russross/blackfriday.v2 + url = https://gopkg.in/russross/blackfriday.v2 +[submodule "vendor/github.com/shurcooL/sanitized_anchor_name"] + path = vendor/github.com/shurcooL/sanitized_anchor_name + url = https://github.com/shurcooL/sanitized_anchor_name +[submodule "vendor/github.com/Depado/bfchroma"] + path = vendor/github.com/Depado/bfchroma + url = https://github.com/Depado/bfchroma +[submodule "vendor/github.com/alecthomas/chroma"] + path = vendor/github.com/alecthomas/chroma + url = https://github.com/alecthomas/chroma +[submodule "vendor/github.com/dlclark/regexp2"] + path = vendor/github.com/dlclark/regexp2 + url = https://github.com/dlclark/regexp2 +[submodule "vendor/github.com/danwakefield/fnmatch"] + path = vendor/github.com/danwakefield/fnmatch + url = https://github.com/danwakefield/fnmatch diff --git a/main.go b/main.go new file mode 100644 index 0000000..f5b2338 --- /dev/null +++ b/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + "io/ioutil" + + "github.com/Depado/bfchroma" + + "gopkg.in/russross/blackfriday.v2" +) + +func main() { + input, err := ioutil.ReadFile("README.md") + if err != nil { + panic(err) + } + html := blackfriday.Run(input, blackfriday.WithRenderer(bfchroma.NewRenderer())) + fmt.Println(string(html)) +} diff --git a/vendor/github.com/Depado/bfchroma b/vendor/github.com/Depado/bfchroma new file mode 160000 index 0000000..ab17b51 --- /dev/null +++ b/vendor/github.com/Depado/bfchroma @@ -0,0 +1 @@ +Subproject commit ab17b511206de6d3592668ad718840a1e8f8283a diff --git a/vendor/github.com/alecthomas/chroma b/vendor/github.com/alecthomas/chroma new file mode 160000 index 0000000..b5ccb8d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma @@ -0,0 +1 @@ +Subproject commit b5ccb8dc322b914484924caf4463d601a64382f7 diff --git a/vendor/github.com/danwakefield/fnmatch b/vendor/github.com/danwakefield/fnmatch new file mode 160000 index 0000000..cbb64ac --- /dev/null +++ b/vendor/github.com/danwakefield/fnmatch @@ -0,0 +1 @@ +Subproject commit cbb64ac3d964b81592e64f957ad53df015803288 diff --git a/vendor/github.com/dlclark/regexp2 b/vendor/github.com/dlclark/regexp2 new file mode 160000 index 0000000..7632a26 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2 @@ -0,0 +1 @@ +Subproject commit 7632a260cbaf5e7594fc1544a503456ecd0827f1 diff --git a/vendor/github.com/shurcooL/sanitized_anchor_name b/vendor/github.com/shurcooL/sanitized_anchor_name new file mode 160000 index 0000000..7bfe4c7 --- /dev/null +++ b/vendor/github.com/shurcooL/sanitized_anchor_name @@ -0,0 +1 @@ +Subproject commit 7bfe4c7ecddb3666a94b053b422cdd8f5aaa3615 diff --git a/vendor/gopkg.in/russross/blackfriday.v2 b/vendor/gopkg.in/russross/blackfriday.v2 new file mode 160000 index 0000000..d3b5b03 --- /dev/null +++ b/vendor/gopkg.in/russross/blackfriday.v2 @@ -0,0 +1 @@ +Subproject commit d3b5b032dc8e8927d31a5071b56e14c89f045135