A syntax highlighter

This module implements a syntax highlighter for different source code languages. Currently it depends on external tools like emacs.

Usage and interface

Documentation on exports

REGTYPElang/1

Usage:lang(L)

L is a language for syntax highlight

    Usage:can_highlight(Lang)

    Check if Lang is a supported language (silently fails if any dependency for highlighting, e.g., emacs, ciao-mode, is not installed)

    • The following properties should hold at call time:
      (basic_props:atm/1)Lang is an atom.
    • The following properties should hold upon exit:
      (syntax_highlight:lang/1)Lang is a language for syntax highlight

    Usage:highlight_file_to_html_string(Lang,Input,Output)

    Produce HTML Output string with syntax highlight from Input file (see highlight_to_html/3)

    Usage:highlight_string_to_html_string(Lang,Input,Output)

    Produce HTML Output string with syntax highlight from Input string (see highlight_to_html/3)

    Usage:highlight_file_to_html_term(Lang,Input,Output)

    Produce HTML Output term with syntax highlight from Input file (see highlight_to_html/3)

    Usage:detect_language(File,Lang)

    Detect language Lang of file File (may look at contents)

    Documentation on imports

    This module has the following direct dependencies: