Highlight 4.12

Highlight converts sourcecode to HTML, RTF, LaTeX, TeX, SVG, Pango, BBCode and terminal escape sequences with coloured syntax highlighting. Language definitions and colour themes are customizable Lua scripts. It provides a plug-in interface to tweak syntax parsing and coloring. LSP servers can be used to add semantic highlighting.

Tags documentation text-processing conversion utilities html latex lua cpp
License GNU GPLv3
State mature

Recent Releases

4.1208 Apr 2024 13:45 minor bugfix: 14.03.2024 Updated astyle lib to version 3.4.14. - Remove `using namespace std;` in header files (merge request saalen/highlight!147).
4.1115 Mar 2024 18:45 minor bugfix: 14.03.2024 Updated astyle lib to version 3.4.13. Updated java definition ((https://gitlab.com/saalen/highlight/-//244). Updated solidity definition ((https://gitlab.com/saalen/highlight/-//217). Backslash symbol in man page. Src/makefile: added -std=c++17 to enable modern C++ features.
4.1021 Oct 2023 16:57 minor bugfix: - updated astyle lib to version 3.4.10
4.918 Oct 2023 13:49 minor bugfix: - updated astyle lib to version 3.4.9 - added support for Elm, Factor and Cpp2 - updated c.lang to include module keywords - fixed Lua nested string deprecation error
4.829 Aug 2023 05:29 minor bugfix: - updated astyle lib to version 3.4.6 - updated yaml definition - omit size property in BBCode output if `--fragment` is set - allow font size unit with `--font-size` for HTML and ODT output - GUI: updated Japanese translation
4.717 Jul 2023 19:36 major bugfix: - updated astyle lib to version 3.4.1 - CLI: fixed member variable initialization
4.623 May 2023 20:18 minor feature: - added `--service-mode` option to run highlight as long running process - added extras/highlight-service.py as an example for the service mode - updated astyle lib to version 3.3 - W32: added `--disable-echo` option - W32: fixed output of ANSI sequences
4.515 Mar 2023 20:00 minor bugfix: - added support for Hare - fixed `--no-trailing-nl` option for LaTeX output - fixed typos in rnc.lang, spn.lang and znn.lang - fixed missing ngerman package for `--replace-quotes` option - fixed quotes highlighting in XML - updated file extension lists - updated astyle lib to version 3.2 beta
4.412 Nov 2022 14:01 minor bugfix: - added support for Zig - added `Legacy` option in lsp.conf to add support for LSP servers without capabilities report - removed apidocs target in makefile - CLI: added `--ls-legacy` option - GUI: added legacy checkbox in the LSP section - GUI W32: fixed issue with non standard filename encodings
4.328 Sep 2022 18:06 minor bugfix: - added support for Carbon - added support for Fortran77 star comments comments - added support for PowerShell block comments - fixed Python formatted string pattern - added new shell completion generation script - W32: fixed Windows compilation headers
4.222 Mar 2022 21:15 minor bugfix: - added support for Critic markup - added support for jam/ham - added support for PureScript - added support for Nix - added ino file mapping / Arduino C - fixed RTF page color attributes - fixed identifier parsing in yaml.lang - fixed symbol parsing in lisp.lang - fixed string parsing in csharp.lang - fixed string parsing in conf.lang - added make target `install-lib-shared` to install shared lib - CLI W32: prevented automatic file pattern expansion - GUI: added Japanese translation - GUI: disabled floating panel (state restore fails)
4.112 May 2021 18:48 minor bugfix: - improved handling of Custom theme attributes - fixed wrong color code in edit-kwrite.theme - added rng file mapping - improved Lisp highlighting - GUI: fixed highlighting options tab title
4.001 Apr 2021 20:04 major feature: - added support for the language server protocol - added new configuration file lsp.conf - renamed std style name to def - renamed str style name to sng - revised color themes - added two more keyword styles for default themes - added user-select default property to HTML line number style - enabled syntax message output with --ls-syntax-error - added Custom theme attribute - added Error and Hover theme properties - enabled syntax error highlighting with --ls-semantic - added delay LSP parameter - added LSP semantic token styles to all themes - removed extras/web_plugins - CLI: added --ls-semantic, --ls-profile, --ls-workspace, --ls-hover, --ls-delay - CLI: deprecated --start-nested, --reformat=user, --reformat-option, --base16, --delim-cr, --plug-in-read - GUI: added LSP configuration tab - GUI: enabled syntax error checkbox - GUI: enabled semantic checkbox and a server capability test
4.0.beta615 Mar 2021 22:08 minor feature: added user-select default property to HTML line number style
4.0.beta522 Feb 2021 18:09 minor bugfix: improved several themes
3.6219 Feb 2021 21:12 minor bugfix: fixed `--list-scripts` output
4.0.beta417 Feb 2021 18:02 major feature: - added two more keyword styles for default themes - added Custom theme attributes for Plain TeX, LaTeX, SVG and Pango - enabled syntax message output with `--ls-syntax-error` - GUI: enabled syntax error checkbox
3.6111 Feb 2021 21:34 minor bugfix: - added --syntax-supported option - fixed indentation of Plain TeX output
4.0.beta209 Feb 2021 21:02 major feature: - improved LSP message handling - added delay LSP parameter - added LSP semantic token styles to base16 themes - CLI: enabled `--ls-semantic` option - GUI: enabled semantic checkbox and a server capability test
4.0.beta130 Jan 2021 12:05 major feature: - added support for the language server protocol - added new configuration file lsp.conf - CLI: added `ls-profile`, `--ls-workspace`,`--ls-hover` - CLI: deprecated `--start-nested`, `--reformat=user`, `--reformat-option`, `--base16`, `--delim-cr`, `--plug-in-read` - GUI: added LSP configuration tab
3.6021 Dec 2020 11:08 minor bugfix: - improved PHP 8 syntax support - added Emacs Org-Mode support - fixed single argument and truecolor output of mark_lines.lua plug-in - added lineno and column parameters to Decorate hook
3.5913 Nov 2020 20:34 minor bugfix: - HTML output: added `white-space: pre-wrap` to pre tag CSS - updated mark_lines.lua plug-in accept a line range as input parameter and output xterm256 terminal sequences - improved Ruby code folding of the outhtml_codefold plug-in - updated astyle lib to rev 672 - added support for reStructured Text - added support for Rego (openpolicyagent.org) - added `outhtml_copy_clipboard.lua` plugin - CLI: adapted default xterm256/truecolor theme to terminal background colour - CLI: adapted ANSI line numbers to terminal background colour - CLI: fixed segfault if the user home directory cannot be determined - GUI: initial font set to Monospace - GUI: replaced highlight.xpm by highlight.png icon
3.5809 Sep 2020 19:10 minor feature: - improved `--force` fallback argument handling - added C++ attribute syntax support - added Lua fuction `StoreValue` to set and retrieve information across Lua states - added `extras/eclipse-themes/eclipse_color_themes.py` script to retrieve themes from eclipsecolorthemes.org - added support for Web Assembly Text - updated mark_lines.lua to output 16m terminal sequences - fixed issues in bash.lang - fixed Bash heredoc highlighting in bash_functions.lua - CLI: `highlight --version -q` only prints the version number - GUI: added theme contrast indicator
3.5714 May 2020 20:25 minor bugfix: - added support for Haml (https://gitlab.com/saalen/highlight/-/issues/140) - added support for Wren - added Lua function `OverrideParam` - fixed regression in xterm256 or truecolor output (https://gitlab.com/saalen/highlight/-/issues/152) - fixed `--list-scripts` with read-only language definitions (https://gitlab.com/saalen/highlight/-/issues/154) - improved several language definitions - Windows GUI: added dark mode
3.5607 Apr 2020 19:33 minor bugfix: - added support for Sequence Alignment Maps (SAM files) - added empty-file mode to `--no-trailing-nl` - fixed issue with `--syntax-by-name` waiting for stdin - fixed issue with `--syntax` reading matching files in the current working directory - fixed string parsing in lisp.lang - fixed output of UTF-8 text in xterm256 or truecolor output - fixed regex in js.lang - fixed calculation of testcase markers with UTF-8 input - allowed number literals with underscores in Java, Scala, D, Julia, C#, Perl and Ada definitions - added Nord theme
3.5529 Jan 2020 18:51 minor bugfix: - improved handling of empty files in xterm256 and truecolor output - added EncodingHint attributes to filetypes.conf and language definitions - CLI: allowed file paths as --theme and --syntax argument - GUI: removed deprecated QTime API call
3.5411 Nov 2019 18:17 minor bugfix: - fixed default colour output in BBCode (https://gitlab.com/saalen/highlight/issues/134) - fixed corner case in sh.lang - fixed syntax tests with UTF-8 input (https://gitlab.com/saalen/highlight/issues/123) - added support for Bash in outhtml_codefold.lua plug-in - added ballerina.lang - added block strings to java.lang - added author hints in themes and language definitions - added C++20 reserved words in c.lang - added editorconfig file and validated all files accordingly (thanks to Tristano Ajmone) - CLI: fixed `--list-scripts` with `-d` or HIGHLIGHT_DATADIR env variable (https://gitlab.com/saalen/highlight/issues/139) - GUI W32: replaced multibyte path trace window by startup hint if NtfsDisable8dot3NameCreation is set - GUI: removed AsciiDoc instruction lines from the README popup window
3.5302 Aug 2019 19:50 minor bugfix: - fixed out-of-range exception with repeated `AddKeyword` calls - added `KeywordFormatHints`, `Priority` and `Constraints` elements to syntax definitions - added Lua function `AddPersistentState` - added Fish syntax definition - makefile: added _FILE_OFFSET_BITS=64 flag - CLI: added optional fallback syntax to `--force` - CLI: added option `--max-size` - GUI: added multibyte path trace window - GUI: fixed superfluous creation of the same stylesheet file
3.5228 May 2019 19:56 minor bugfix: - added negation ` ` to test state indicators (https://gitlab.com/saalen/highlight/issues/122) - added support for Hugo (https://gitlab.com/saalen/highlight/merge_requests/113) - added 5 duotone themes (https://gitlab.com/saalen/highlight/merge_requests/115) - CLI: fixed segfault with `--force` (https://gitlab.com/saalen/highlight/issues/125) - GUI: limited font selection to monospace fonts (https://gitlab.com/saalen/highlight/issues/124)
3.5117 May 2019 19:30 minor bugfix: - SVG output: added `white-space: pre` in styles - HTML output: replaced apos; by #39; - HTML output: fixed index file format (missing close tags) - CLI: moved syntax recognition functions to DataDir class - CLI: added regular expressions and default false values to --verbose output - CLI: fixed `--list-cat` without `--list-scripts` - CLI: added optional argument to `--base16` - CLI: added default base16 themes - CLI: added `--isolate` option - GUI: improved UTF16 input path handling on Windows
3.5029 Mar 2019 21:30 minor bugfix: - added lineno, column parameters to OnStateChange hook - added support for Crystal - added support for Slim - compress man docs during installation - fixed several typos in documentaion and manpages - CLI: added `--syntax-by-name` option - CLI: removed deprecated `--list-langs` and`--list-themes` options - GUI: added terminal sequence output options
3.4907 Feb 2019 21:19 minor bugfix: - fixed more problems with syntax test indicators reporting wrong states - added support for Meson, Solidity, TOML and Terraform - improved Perl and Yaml highlighting - added Categories field to all config files - CLI: added category info in --list-scripts output - CLI: added --list-cat option - GUI: added theme category selection - GUI: display categories of selected syntax or theme
3.4814 Dec 2018 10:36 minor bugfix: - fixed --list-scripts abortion with Fedora default compilation options - fixed a problem with syntax test indicators reporting wrong states after comments - improved Verilog syntax - improved quoted string highlighting for Perl and Ruby - detection of pkg-config's Lua version in src/makefile
3.4713 Oct 2018 20:08 major bugfix: - fixed xterm256 and truecolor whitespace output #2 - fixed LaTeX, TeX, SVG and ODT whitespace output (regression of 3.45) - added darkplus theme - converted ChangeLog to AsciiDoc - allowed state test indicators to match both whitespace (ws) and the enclosing state (others) - CLI: default output changed to xterm256 or truecolor if run in a terminal with color support and only a single file is outputted - GUI: added checkbox in the clipboard tab to output selected lines only
3.4607 Oct 2018 09:45 minor bugfix: -fixed whitespace output in xterm256 and truecolor output -converted manuals to AsciiDoc
3.4503 Oct 2018 08:34 major feature: -added DocumentHeader and DocumentFooter plug-in hooks -added RemoveKeyword Lua function for syntax definitions -added syntax test indicators (see README_TESTCASES) -added support for ISO and R10 variants of Modula2 -fixed R identifiers -fixed ALAN IF identifiers -fixed issue with Bash string interpolation -fixed some bugs found by coverity tool -added Swift keywords and types -added filetypes.conf.5 man page -added Gradle extension mapping
3.4420 Jul 2018 19:20 major feature: -fixed gcc 8 compilation warnings -fixed Ruby string interpolation -added support for ALAN IF -added 107 Base16 themes https://github.com/chriskempson/base16 -updated Rust and Java reserved words lists -revised documentation -moved extras/css-themes into extras/themes-resources -added extras/themes-resources/base16 -GUI: added Base16 theme selection checkbox -CLI: added --base16 option to enable the new themes -CLI: accept - as argument to read from stdin
3.4330 Apr 2018 14:19 minor bugfix: -updated astyle code to release 3.1 (Rev. 655) -added webkit reformatting style -improved several language definitions -fixed Matlab string recognition -fixed Autohotkey escape sequence recognition -added excel.lang -CLI: added --reformat-option -CLI: added --line-range -GUI: added Bulgarian translation
3.4223 Jan 2018 19:56 minor bugfix: -fixed HL_OUTPUT in Lua state for HL_FORMAT_XHTML and HL_FORMAT_TRUECOLOR values -fixed lib-shared make target -updated astyle code to release 3.1.0 beta -added Polygen and EBNF2 syntax definitions -added pywal terminal colouring template in extras/pywal -added reformatting style ratliff (replaces banner) -added extras/langDefs-resources/cleanslate.lang -improved Perl6 compatibility -improved PHP string interpolation -improved Haskell definition -CLI: added --canvas option to define background color padding in ANSI output -GUI: added French translation -GUI: added Scripts tab -GUI: minor bugfixes
3.4128 Nov 2017 18:40 minor feature: -renamed examples directory to extras -line anchors (-a) are attached as id attribute to the first span or li tag in HTML output -renamed ID prefix in outhtml_codefold plug-in to be compatible with -a IDs -added fstab.lang and added anacrontab in filetypes.conf -removed references to OutputType::HTML32 -added extras/css-themes and extras/langDefs-resources -CLI: removed deprecated indicator of --data-dir option -CLI: added --no-version-info option -GUI: fixed initial theme selection -GUI: added "Omit version info comment" option -GUI: added "Copy with MIME type" option for HTML output
3.4024 Oct 2017 18:22 minor feature: -fixed Ruby string parsing -fixed segfault on sparc64 -fixed PureBasic definition -added CMake definition -added email definition -linked scm suffix to lisp definition -W32 CLI: support HIGHLIGHT_DATADIR and --data-dir options -revised documentation
3.3926 Jul 2017 19:57 minor feature: -added syntax for Docker and Elixir -improved HTML, Julia, Kotlin and Smalltalk syntax definitions -GUI: added "Paste, Convert and Copy" button
3.3821 Jun 2017 12:57 minor feature: -fixed Bash variable highlighting issue -updated astyle code to release 3.0.1 -added bash_ref_man7_org.lua plugin
3.3730 May 2017 19:53 minor feature: -fixed Perl string highlighting issue -fixed highlighting if a line continues after the nested code delimiter -updated astyle code to release 3.0 -added examples/pandoc -added syntax mapping for markdown -added syntax mapping for clj -improved Java definition -added theme to JSON converter in examples/json -CLI: added support for environment variable HIGHLIGHT_OPTIONS
3.3604 Apr 2017 19:27 minor feature: -fixed code folding plugin to support more Ruby conditional modifiers -fixed Perl quoted string highlighting -added new GeneratorOverride syntax definition parameter -added Filenames parameter in filetypes.conf to assign input filenames to syntax types -added FASM definition and edit-fasm theme -added outhtml_ie7_webctrl plug-in -GUI: file extensions can be configured for multiple languages, triggers syntax selection prompt -GUI: added Italian translation
3.3528 Feb 2017 18:56 minor feature: -fixed code folding plugin to support Ruby conditional modifiers -fixed JSON definition -fixed output of unknown syntax warning with applied force switch -added state trace parameter to Decorate plug-in function -added GDScript definition and edit-godot theme -updated SWIG code samples -updated Artistic Style lib (SVN Rev. 553) -revised docs -CLI: fixed creation of hidden files if output filename is prepended by its input path -CLI: added switch --stdout
3.3431 Dec 2016 13:33 minor feature: -fixed segfault with --skip applied on a single file input list -added support for Python 3.6 syntax -added Github and Sourceforge themes
3.3302 Nov 2016 19:44 minor feature: -fixed highlighting of nested section delimiters -fixed PHP definition -fixed font family declaration in SVG -fixed user defined encoding in ODT -fixed unnecessary output of style file with --inline-css -added vimscript language definition -added Coffeescript language definition -added PureBasic definition and theme -added JSX language definition -added PO translation definition -added plug-in outhtml_add_figure.lua -updated js definition -updated Artistic Style lib -improved various color themes and syntax definitions
3.3226 Sep 2016 18:38 minor feature: -added support for true color escape codes (--out-format truecolor) -fixed xterm256 output for paging with less -fixed operator regex in rnc.lang, crk.lang and yaml.lang -added Pony and Whiley definitions -updated Ceylon, Julia and TypeScript definitions
3.3101 Aug 2016 08:26 minor feature: -revised documentation -GUI: minor layout issues were fixed
3.3001 Jul 2016 15:58 minor feature: -the data directory can be defined with the HIGHLIGHT_DATADIR environment variable -fixed RTF output of UTF-8 input -fixed XML comment recognition -data search directories were appended to the result of --list-scripts -revised older syntax definitions -updated base URLs of bash_ref_linuxmanpages and cpp_ref_qtproject plug-ins -GUI: added system copy and paste shortcuts for clipboard functions
3.2923 May 2016 15:47 minor feature: -added Ansible Yaml and Chapel definitions -fixed gcc 6 warnings about deprecated auto_ptr usage -GUI: fixed style file output if "write to source directory" option is checked
3.2816 Feb 2016 17:53 minor feature: -added support of Pascal, Lua, Ruby and C# regions in outhtml_codefold.lua -improved outhtml_codefold.lua to handle embedded languages -added string delimiters in the Ruby definition -added new AssertEqualLength flag in string section of language definitions -improved heredoc parsing -fixed Lua multiline string recognition -improved SVG whitespace output -added Nim and mIRC Scripting definitions
3.2721 Jan 2016 21:12 minor feature: -improved outhtml_codefold.lua plug-in to ignore brackets on the same line -added RTF output to mark_lines.lua plug-in -fixed Powershell and NSIS definitions -added JSON and Github Markdown definitions -CLI: added --keep-injections option to force plugin injection output with -f -GUI: added keep injections checkbox -GUI: fixed crash after removing selected plugins
3.2614 Jan 2016 20:30 minor feature: -added HL_REJECT state to be used in a OnStateChange function -added DecorateLineBegin and DecorateLineEnd hooks -added mark_lines.lua, outhtml_codefold.lua, comment_links.lua plug-ins -fixed font face in ODT output -fixed Operators parameter in frink.lang and oorexx.lang -fixed regular expression parsing within strings for JS, Perl and Ruby -CLI: added --page-color option to include a page color in RTF output -GUI: added RTF page color option
3.2521 Dec 2015 20:23 minor feature: -added new SVG definition to support embedded scripting -improved js.lang, css.lang, scss.lang, less.lang, tsql.lang -modified HTML ordered list output to work better with new plug-ins -renamed plug-in variable HL_INPUT_FILE to HL_PLUGIN_PARAM -CLI: renamed --plug-in-read option to --plug-in-param -GUI: updated plug-in parameter label and tool-tips -GUI: fixed minor issues
3.2403 Nov 2015 10:18 minor feature: -fixed TeX output for cweb documents -fixed string interpolation in bat.lang -added several HTML output plug-ins -added TCL extension in examples/tcl -added support for Kotlin, Nginx and Julia -updated php.lang to include version 7 keywords -updated ceylon.lang to include version 1.2 keywords -updated scripts in examples directory -CLI: style-infile option marked as deprecated -GUI: shortened paths in file input lists
3.2305 Aug 2015 08:12 minor feature: -added support fur Rust and generic config files -added some extensions in filetypes.conf -fixed Matlab definition and style -CLI: fixed --list-scripts with unknown argument
3.2223 Feb 2015 18:45 minor feature: -updated astyle code to release 2.05.1 -fixed shebang recognition -GUI: added option to define line numbering start
3.2102 Feb 2015 19:11 minor feature: Added support for LESS, SASS and Stylus CSS processors. Added support for Lua 5.3, removed LUA52 makefile option. Fixed Haskell, Perl, RNC and js.lang.
3.2002 Dec 2014 20:15 minor feature: Updated Artistic Style lib. Added VTK code formatting style.
3.1917 Sep 2014 18:11 minor feature: Added bold, italic and underline attributes to xterm256 ANSI output Fixed assembler mapping in filetypes.conf Added Swift definition Improved ASP, F#, OCaml and Lisp syntax definitions Added interpolation patterns to several definitions Updated base URLs in cpp_ref_gtk_gnome and cpp_ref_qtproject plug-ins CLI: added Pango markup output option
3.1811 Aug 2014 18:42 minor feature: Filenames without extension (ie. makefile) can be mapped in filetypes.conf. A new GDB language definition was added.