diff --git a/docs/CHANGELOG.adoc b/docs/CHANGELOG.adoc index 7ebd7415a6a0e7dbfc136332c9245213c6d6114a..eaafa356d56565d47cf92e075488668818b95296 100644 --- a/docs/CHANGELOG.adoc +++ b/docs/CHANGELOG.adoc @@ -6,6 +6,9 @@ https://github.com/asciidoctor/asciidoc-docs/commits/main[commit history]. == Published Q1 2023 +Added:: +* Add tip for how to find list of supported source languages for the various syntax highlighters + Changed:: * Clarify that superscript and subscript formatting is neither constrained nor unconstrained, but rather a specialty hybrid * Clarify that first menu item must start with word character or character reference diff --git a/docs/modules/verbatim/pages/source-highlighter.adoc b/docs/modules/verbatim/pages/source-highlighter.adoc index 041a8ecf298d484a641ec09658bd166a0420cdfe..bb550fe193f495fef16e27501501b4a2cec1b5ef 100644 --- a/docs/modules/verbatim/pages/source-highlighter.adoc +++ b/docs/modules/verbatim/pages/source-highlighter.adoc @@ -73,8 +73,14 @@ In other words, the `source-highlighter` attribute means "`use this syntax highl To apply highlighting to a block of source code, you must specify a source language. If the block is a literal block or paragraph, you must also specify the `source` style. -The available source language values are defined by the syntax highlighter library. -In most cases, the source language value is the proper name of the language in lowercase (e.g., `ruby`, `java`). +The AsciiDoc language does not specify the list of valid source language values. +Instead, the available source language values are defined by the syntax highlighter library. + +TIP: You can find the list of available languages supported by Rouge in the https://github.com/rouge-ruby/rouge/blob/master/docs/Languages.md[Rouge documentation]. +You can print a list of available languages supported by Pygments by running `pygmentize -L formatters`. +The available languages supported by highlight.js depends on which bundle of highlight.js you are using. + +Typically, the source language value is the proper name of the language in lowercase (e.g., `ruby`, `java`). Most syntax highlighters also accept using the source file extension (e.g., `js`, `rb`), though it's important to be consistent. If the syntax highlighter doesn't recognize or support the source language, the block will not be highlighted.