diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5549a43 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/FooSoft/md2vim + +go 1.16 + +require github.com/russross/blackfriday v1.6.0 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..270cecf --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= +github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= diff --git a/vimdoc.go b/vimdoc.go index 895552f..7fe4860 100644 --- a/vimdoc.go +++ b/vimdoc.go @@ -318,14 +318,9 @@ func (*vimDoc) AutoLink(out *bytes.Buffer, link []byte, kind int) { } func (*vimDoc) CodeSpan(out *bytes.Buffer, text []byte) { - r := regexp.MustCompile(`\s`) - - // vim does not correctly highlight space-delimited words in code spans - if !r.Match(text) { - out.WriteString("`") - out.Write(text) - out.WriteString("`") - } + out.WriteString("`") + out.Write(text) + out.WriteString("`") } func (*vimDoc) DoubleEmphasis(out *bytes.Buffer, text []byte) {