GitXplorerGitXplorer
d

go-highlight

public
23 stars
9 forks
3 issues

Commits

List of commits on branch master.
Unverified
34974ebcad41f0ff31f66c4da097af1f7d335feb

Merge pull request #3 from errordeveloper/master

dd4l3k committed 8 years ago
Verified
ce3036b16fa0fdcee2a3f3a58d15c377a9b60093

Bump to 9.9.0

eerrordeveloper committed 8 years ago
Verified
2069b6422dcadc6be001409dd0a319204390b98e

highlight: Add basic sublanguage support

dd4l3k committed 8 years ago
Verified
aadc75fff95c3aa900291936a540b28f6c1dc34d

detect: always make parent available for relevancy

dd4l3k committed 8 years ago
Unverified
e412c4cb73e854ccc9b64f69ba08cacdf68c4466

fixed empty highlights tag bug and improved JIT error messages

dd4l3k committed 8 years ago
Verified
a5ffcede835e9da6dfb5ef4baa919a56198c4f01

ci: removed unused xenial source

dd4l3k committed 8 years ago

README

The README file for this repository.

go-highlight GoDoc Build Status

A Go (Golang) code syntax highlighting library. It uses automatically converted highlight.js language definitions.

Usage

package main

import "github.com/d4l3k/go-highlight"

func main() {
  highlight.Highlight("go", `
    package main

    import "fmt"

    func main() {
      fmt.Println("Duck!")
    }
  `)
  /*
    <keyword>package</keyword> main

    <keyword>import</keyword> <string>"fmt"</string>

    <keyword>func</keyword> main() {
      fmt.Println(<string>"Duck!"</string>)
    }
  */
}

Copyright

The code written by Tristan Rice is licensed under the MIT license.

The language definitions are ported from highlight.js which is licensed under the BSD licence.