]> source.dussan.org Git - redmine.git/commitdiff
Dynamic generation of supported code highlighting languages in help section (#40681).
authorGo MAEDA <maeda@farend.jp>
Sun, 19 May 2024 05:07:42 +0000 (05:07 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 19 May 2024 05:07:42 +0000 (05:07 +0000)
Patch by Go MAEDA (@maeda).

git-svn-id: https://svn.redmine.org/redmine/trunk@22840 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/help_controller.rb
app/views/help/wiki_syntax/code_highlighting_languages.html.erb
test/functional/help_controller_test.rb

index f085e18da079da6c2f28f82843da458fea405884..766781afecc8a7ee7321a22800841ec83ce1dc20 100644 (file)
@@ -30,6 +30,7 @@ class HelpController < ApplicationController
   end
 
   def show_code_highlighting
+    @available_lexers = Rouge::Lexer.all.sort_by(&:tag)
     render template: "help/wiki_syntax/code_highlighting_languages", layout: nil
   end
 end
index 57ae458889d17ebe7f9894eb01153e775e16190b..8e15e1051566d7c8b6ad210b2f3926388aceeb75 100644 (file)
       <th>Language</th>
       <th>Description</th>
     </tr>
-    <tr>
-      <td>abap</td>
-      <td>SAP - Advanced Business Application Programming</td>
-    </tr>
-    <tr>
-      <td>actionscript</td>
-      <td>ActionScript [aliases: as,as3]</td>
-    </tr>
-    <tr>
-      <td>ada</td>
-      <td>The Ada 2012 programming language</td>
-    </tr>
-    <tr>
-      <td>apache</td>
-      <td>configuration files for Apache web server</td>
-    </tr>
-    <tr>
-      <td>apex</td>
-      <td>The Apex programming language (provided by salesforce)</td>
-    </tr>
-    <tr>
-      <td>apiblueprint</td>
-      <td>Markdown based API description language. [aliases: apiblueprint,apib]</td>
-    </tr>
-    <tr>
-      <td>applescript</td>
-      <td>The AppleScript scripting language by Apple Inc. (https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) [aliases: applescript]</td>
-    </tr>
-    <tr>
-      <td>armasm</td>
-      <td>Arm assembly syntax</td>
-    </tr>
-    <tr>
-      <td>augeas</td>
-      <td>The Augeas programming language (augeas.net) [aliases: aug]</td>
-    </tr>
-    <tr>
-      <td>awk</td>
-      <td>pattern-directed scanning and processing language</td>
-    </tr>
-    <tr>
-      <td>batchfile</td>
-      <td>Windows Batch File [aliases: bat,batch,dosbatch,winbatch]</td>
-    </tr>
-    <tr>
-      <td>bbcbasic</td>
-      <td>BBC BASIC syntax</td>
-    </tr>
-    <tr>
-      <td>bibtex</td>
-      <td>BibTeX [aliases: bib]</td>
-    </tr>
-    <tr>
-      <td>biml</td>
-      <td>BIML, Business Intelligence Markup Language</td>
-    </tr>
-    <tr>
-      <td>bpf</td>
-      <td>BPF bytecode syntax</td>
-    </tr>
-    <tr>
-      <td>brainfuck</td>
-      <td>The Brainfuck programming language</td>
-    </tr>
-    <tr>
-      <td>brightscript</td>
-      <td>BrightScript Programming Language (https://developer.roku.com/en-ca/docs/references/brightscript/language/brightscript-language-reference.md) [aliases: bs,brs]</td>
-    </tr>
-    <tr>
-      <td>bsl</td>
-      <td>The 1C:Enterprise programming language</td>
-    </tr>
-    <tr>
-      <td>c</td>
-      <td>The C programming language</td>
-    </tr>
-    <tr>
-      <td>ceylon</td>
-      <td>Say more, more clearly.</td>
-    </tr>
-    <tr>
-      <td>cfscript</td>
-      <td>CFScript, the CFML scripting language [aliases: cfc]</td>
-    </tr>
-    <tr>
-      <td>cisco_ios</td>
-      <td>Cisco IOS configuration lexer</td>
-    </tr>
-    <tr>
-      <td>clean</td>
-      <td>The Clean programming language (clean.cs.ru.nl)</td>
-    </tr>
-    <tr>
-      <td>clojure</td>
-      <td>The Clojure programming language (clojure.org) [aliases: clj,cljs]</td>
-    </tr>
-    <tr>
-      <td>cmake</td>
-      <td>The cross-platform, open-source build system</td>
-    </tr>
-    <tr>
-      <td>cmhg</td>
-      <td>RISC OS C module header generator source file</td>
-    </tr>
-    <tr>
-      <td>codeowners</td>
-      <td>Code Owners syntax (https://docs.gitlab.com/ee/user/project/codeowners/reference.html)</td>
-    </tr>
-    <tr>
-      <td>coffeescript</td>
-      <td>The Coffeescript programming language (coffeescript.org) [aliases: coffee,coffee-script]</td>
-    </tr>
-    <tr>
-      <td>common_lisp</td>
-      <td>The Common Lisp variant of Lisp (common-lisp.net) [aliases: cl,common-lisp,elisp,emacs-lisp,lisp]</td>
-    </tr>
-    <tr>
-      <td>conf</td>
-      <td>A generic lexer for configuration files [aliases: config,configuration]</td>
-    </tr>
-    <tr>
-      <td>console</td>
-      <td>A generic lexer for shell sessions. Accepts ?lang and ?output lexer options, a ?prompt option, ?comments to enable # comments, and ?error to handle error messages. [aliases: terminal,shell_session,shell-session]</td>
-    </tr>
-    <tr>
-      <td>coq</td>
-      <td>Coq (coq.inria.fr)</td>
-    </tr>
-    <tr>
-      <td>cpp</td>
-      <td>The C++ programming language [aliases: c++]</td>
-    </tr>
-    <tr>
-      <td>crystal</td>
-      <td>Crystal The Programming Language (crystal-lang.org) [aliases: cr]</td>
-    </tr>
-    <tr>
-      <td>csharp</td>
-      <td>a multi-paradigm language targeting .NET [aliases: c#,cs]</td>
-    </tr>
-    <tr>
-      <td>css</td>
-      <td>Cascading Style Sheets, used to style web pages</td>
-    </tr>
-    <tr>
-      <td>csvs</td>
-      <td>The CSV Schema Language (digital-preservation.github.io)</td>
-    </tr>
-    <tr>
-      <td>cuda</td>
-      <td>Compute Unified Device Architecture, used for programming with NVIDIA GPU</td>
-    </tr>
-    <tr>
-      <td>cypher</td>
-      <td>The Cypher query language (neo4j.com/docs/cypher-manual) [aliases: cypher]</td>
-    </tr>
-    <tr>
-      <td>cython</td>
-      <td>Cython and Pyrex source code (cython.org) [aliases: pyx,pyrex]</td>
-    </tr>
-    <tr>
-      <td>d</td>
-      <td>The D programming language(dlang.org) [aliases: dlang]</td>
-    </tr>
-    <tr>
-      <td>dafny</td>
-      <td>The Dafny programming language (github.com/dafny-lang/dafny)</td>
-    </tr>
-    <tr>
-      <td>dart</td>
-      <td>The Dart programming language (dart.dev)</td>
-    </tr>
-    <tr>
-      <td>datastudio</td>
-      <td>Datastudio scripting language</td>
-    </tr>
-    <tr>
-      <td>diff</td>
-      <td>Lexes unified diffs or patches [aliases: patch,udiff]</td>
-    </tr>
-    <tr>
-      <td>digdag</td>
-      <td>A simple, open source, multi-cloud workflow engine (https://www.digdag.io/)</td>
-    </tr>
-    <tr>
-      <td>docker</td>
-      <td>Dockerfile syntax [aliases: dockerfile,Dockerfile]</td>
-    </tr>
-    <tr>
-      <td>dot</td>
-      <td>graph description language [aliases: graphviz]</td>
-    </tr>
-    <tr>
-      <td>ecl</td>
-      <td>Enterprise Control Language (hpccsystems.com)</td>
-    </tr>
-    <tr>
-      <td>eex</td>
-      <td>Embedded Elixir [aliases: leex,heex]</td>
-    </tr>
-    <tr>
-      <td>eiffel</td>
-      <td>Eiffel programming language</td>
-    </tr>
-    <tr>
-      <td>elixir</td>
-      <td>Elixir language (elixir-lang.org) [aliases: elixir,exs]</td>
-    </tr>
-    <tr>
-      <td>elm</td>
-      <td>The Elm programming language (http://elm-lang.org/)</td>
-    </tr>
-    <tr>
-      <td>email</td>
-      <td>An email message [aliases: eml,e-mail]</td>
-    </tr>
-    <tr>
-      <td>epp</td>
-      <td>Embedded Puppet template files</td>
-    </tr>
-    <tr>
-      <td>erb</td>
-      <td>Embedded ruby template files [aliases: eruby,rhtml]</td>
-    </tr>
-    <tr>
-      <td>erlang</td>
-      <td>The Erlang programming language (erlang.org) [aliases: erl]</td>
-    </tr>
-    <tr>
-      <td>escape</td>
-      <td>A generic lexer for including escaped content - see Formatter.enable_escape! [aliases: esc]</td>
-    </tr>
-    <tr>
-      <td>factor</td>
-      <td>Factor, the practical stack language (factorcode.org)</td>
-    </tr>
-    <tr>
-      <td>fluent</td>
-      <td>Fluent localization files [aliases: ftl]</td>
-    </tr>
-    <tr>
-      <td>fortran</td>
-      <td>Fortran 2008 (free-form)</td>
-    </tr>
-    <tr>
-      <td>freefem</td>
-      <td>The FreeFEM programming language (freefem.org) [aliases: ff]</td>
-    </tr>
-    <tr>
-      <td>fsharp</td>
-      <td>F# (fsharp.net)</td>
-    </tr>
-    <tr>
-      <td>gdscript</td>
-      <td>The Godot Engine programming language (https://godotengine.org/) [aliases: gd,gdscript]</td>
-    </tr>
-    <tr>
-      <td>ghc-cmm</td>
-      <td>GHC Cmm is the intermediate representation of the GHC Haskell compiler [aliases: cmm]</td>
-    </tr>
-    <tr>
-      <td>ghc-core</td>
-      <td>Intermediate representation of the GHC Haskell compiler.</td>
-    </tr>
-    <tr>
-      <td>gherkin</td>
-      <td>A business-readable spec DSL (github.com/cucumber/cucumber/wiki/Gherkin) [aliases: cucumber,behat]</td>
-    </tr>
-    <tr>
-      <td>glsl</td>
-      <td>The GLSL shader language</td>
-    </tr>
-    <tr>
-      <td>go</td>
-      <td>The Go programming language (http://golang.org) [aliases: go,golang]</td>
-    </tr>
-    <tr>
-      <td>gradle</td>
-      <td>A powerful build system for the JVM</td>
-    </tr>
-    <tr>
-      <td>graphql</td>
-      <td>GraphQL</td>
-    </tr>
-    <tr>
-      <td>groovy</td>
-      <td>The Groovy programming language (http://www.groovy-lang.org/)</td>
-    </tr>
-    <tr>
-      <td>hack</td>
-      <td>The Hack programming language (hacklang.org) [aliases: hack,hh]</td>
-    </tr>
-    <tr>
-      <td>haml</td>
-      <td>The Haml templating system for Ruby (haml.info) [aliases: HAML]</td>
-    </tr>
-    <tr>
-      <td>handlebars</td>
-      <td>the Handlebars and Mustache templating languages [aliases: hbs,mustache]</td>
-    </tr>
-    <tr>
-      <td>haskell</td>
-      <td>The Haskell programming language (haskell.org) [aliases: hs]</td>
-    </tr>
-    <tr>
-      <td>haxe</td>
-      <td>Haxe Cross-platform Toolkit (http://haxe.org) [aliases: hx,haxe]</td>
-    </tr>
-    <tr>
-      <td>hcl</td>
-      <td>Hashicorp Configuration Language, used by Terraform and other Hashicorp tools</td>
-    </tr>
-    <tr>
-      <td>hlsl</td>
-      <td>HLSL, the High Level Shading Language for DirectX (docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl)</td>
-    </tr>
-    <tr>
-      <td>hocon</td>
-      <td>Human-Optimized Config Object Notation (https://github.com/lightbend/config)</td>
-    </tr>
-    <tr>
-      <td>hql</td>
-      <td>Hive Query Language SQL dialect</td>
-    </tr>
-    <tr>
-      <td>html</td>
-      <td>HTML, the markup language of the web</td>
-    </tr>
-    <tr>
-      <td>http</td>
-      <td>http requests and responses</td>
-    </tr>
-    <tr>
-      <td>hylang</td>
-      <td>The HyLang programming language (hylang.org) [aliases: hy]</td>
-    </tr>
-    <tr>
-      <td>idlang</td>
-      <td>Interactive Data Language</td>
-    </tr>
-    <tr>
-      <td>idris</td>
-      <td>The Idris programming language (idris-lang.org) [aliases: idr]</td>
-    </tr>
-    <tr>
-      <td>igorpro</td>
-      <td>WaveMetrics Igor Pro</td>
-    </tr>
-    <tr>
-      <td>ini</td>
-      <td>the INI configuration format</td>
-    </tr>
-    <tr>
-      <td>io</td>
-      <td>The IO programming language (http://iolanguage.com)</td>
-    </tr>
-    <tr>
-      <td>irb</td>
-      <td>Shell sessions in IRB or Pry [aliases: pry]</td>
-    </tr>
-    <tr>
-      <td>irb_output</td>
-      <td></td>
-    </tr>
-    <tr>
-      <td>isabelle</td>
-      <td>Isabelle theories (isabelle.in.tum.de) [aliases: isa,Isabelle]</td>
-    </tr>
-    <tr>
-      <td>isbl</td>
-      <td>The ISBL programming language</td>
-    </tr>
-    <tr>
-      <td>j</td>
-      <td>The J programming language (jsoftware.com)</td>
-    </tr>
-    <tr>
-      <td>janet</td>
-      <td>The Janet programming language (janet-lang.org) [aliases: jdn]</td>
-    </tr>
-    <tr>
-      <td>java</td>
-      <td>The Java programming language (java.com)</td>
-    </tr>
-    <tr>
-      <td>javascript</td>
-      <td>JavaScript, the browser scripting language [aliases: js]</td>
-    </tr>
-    <tr>
-      <td>jinja</td>
-      <td>Django/Jinja template engine (jinja.pocoo.org) [aliases: django]</td>
-    </tr>
-    <tr>
-      <td>jsl</td>
-      <td>The JMP Scripting Language (JSL) (jmp.com)</td>
-    </tr>
-    <tr>
-      <td>json</td>
-      <td>JavaScript Object Notation (json.org)</td>
-    </tr>
-    <tr>
-      <td>json-doc</td>
-      <td>JavaScript Object Notation with extensions for documentation [aliases: jsonc]</td>
-    </tr>
-    <tr>
-      <td>jsonnet</td>
-      <td>An elegant, formally-specified config language for JSON</td>
-    </tr>
-    <tr>
-      <td>jsp</td>
-      <td>JSP</td>
-    </tr>
-    <tr>
-      <td>jsx</td>
-      <td>An XML-like syntax extension to JavaScript (facebook.github.io/jsx/) [aliases: jsx,react]</td>
-    </tr>
-    <tr>
-      <td>julia</td>
-      <td>The Julia programming language [aliases: jl]</td>
-    </tr>
-    <tr>
-      <td>kotlin</td>
-      <td>Kotlin Programming Language (http://kotlinlang.org)</td>
-    </tr>
-    <tr>
-      <td>lasso</td>
-      <td>The Lasso programming language (lassosoft.com) [aliases: lassoscript]</td>
-    </tr>
-    <tr>
-      <td>lean</td>
-      <td>The Lean programming language (leanprover.github.io) [aliases: lean]</td>
-    </tr>
-    <tr>
-      <td>liquid</td>
-      <td>Liquid is a templating engine for Ruby (liquidmarkup.org)</td>
-    </tr>
-    <tr>
-      <td>literate_coffeescript</td>
-      <td>Literate coffeescript [aliases: litcoffee]</td>
-    </tr>
-    <tr>
-      <td>literate_haskell</td>
-      <td>Literate haskell [aliases: lithaskell,lhaskell,lhs]</td>
-    </tr>
-    <tr>
-      <td>livescript</td>
-      <td>LiveScript, a language which compiles to JavaScript (livescript.net) [aliases: ls]</td>
-    </tr>
-    <tr>
-      <td>llvm</td>
-      <td>The LLVM Compiler Infrastructure (http://llvm.org/)</td>
-    </tr>
-    <tr>
-      <td>lua</td>
-      <td>Lua (http://www.lua.org)</td>
-    </tr>
-    <tr>
-      <td>lustre</td>
-      <td>The Lustre programming language (Verimag)</td>
-    </tr>
-    <tr>
-      <td>lutin</td>
-      <td>The Lutin programming language (Verimag)</td>
-    </tr>
-    <tr>
-      <td>m68k</td>
-      <td>Motorola 68k Assembler</td>
-    </tr>
-    <tr>
-      <td>magik</td>
-      <td>Smallworld Magik</td>
-    </tr>
-    <tr>
-      <td>make</td>
-      <td>Makefile syntax [aliases: makefile,mf,gnumake,bsdmake]</td>
-    </tr>
-    <tr>
-      <td>markdown</td>
-      <td>Markdown, a light-weight markup language for authors [aliases: md,mkd]</td>
-    </tr>
-    <tr>
-      <td>mason</td>
-      <td>The HTML::Mason framework (https://metacpan.org/pod/HTML::Mason)</td>
-    </tr>
-    <tr>
-      <td>mathematica</td>
-      <td>Wolfram Mathematica, the world&#39;s definitive system for modern technical computing. [aliases: wl]</td>
-    </tr>
-    <tr>
-      <td>matlab</td>
-      <td>Matlab [aliases: m]</td>
-    </tr>
-    <tr>
-      <td>meson</td>
-      <td>Meson&#39;s specification language (mesonbuild.com)</td>
-    </tr>
-    <tr>
-      <td>minizinc</td>
-      <td>MiniZinc is a free and open-source constraint modeling language (minizinc.org)</td>
-    </tr>
-    <tr>
-      <td>moonscript</td>
-      <td>Moonscript (http://www.moonscript.org) [aliases: moon]</td>
-    </tr>
-    <tr>
-      <td>mosel</td>
-      <td>An optimization language used by Fico&#39;s Xpress.</td>
-    </tr>
-    <tr>
-      <td>msgtrans</td>
-      <td>RISC OS message translator messages file</td>
-    </tr>
-    <tr>
-      <td>mxml</td>
-      <td>MXML</td>
-    </tr>
-    <tr>
-      <td>nasm</td>
-      <td>Netwide Assembler</td>
-    </tr>
-    <tr>
-      <td>nesasm</td>
-      <td>Nesasm3 assembly (6502 asm) [aliases: nes]</td>
-    </tr>
-    <tr>
-      <td>nginx</td>
-      <td>configuration files for the nginx web server (nginx.org)</td>
-    </tr>
-    <tr>
-      <td>nial</td>
-      <td>The Nial programming language (nial-array-language.org)</td>
-    </tr>
-    <tr>
-      <td>nim</td>
-      <td>The Nim programming language (http://nim-lang.org/) [aliases: nimrod]</td>
-    </tr>
-    <tr>
-      <td>nix</td>
-      <td>The Nix expression language (https://nixos.org/nix/manual/#ch-expression-language) [aliases: nixos]</td>
-    </tr>
-    <tr>
-      <td>objective_c</td>
-      <td>an extension of C commonly used to write Apple software [aliases: objc,obj-c,obj_c,objectivec]</td>
-    </tr>
-    <tr>
-      <td>objective_cpp</td>
-      <td>an extension of C++ uncommonly used to write Apple software [aliases: objcpp,obj-cpp,obj_cpp,objectivecpp,objc++,obj-c++,obj_c++,objectivec++]</td>
-    </tr>
-    <tr>
-      <td>ocaml</td>
-      <td>Objective Caml (ocaml.org)</td>
-    </tr>
-    <tr>
-      <td>ocl</td>
-      <td>OMG Object Constraint Language (omg.org/spec/OCL) [aliases: OCL]</td>
-    </tr>
-    <tr>
-      <td>openedge</td>
-      <td>The OpenEdge ABL programming language [aliases: abl]</td>
-    </tr>
-    <tr>
-      <td>opentype_feature_file</td>
-      <td>Feature specifications for an OpenType font (adobe-type-tools.github.io/afdko) [aliases: fea,opentype,opentypefeature]</td>
-    </tr>
-    <tr>
-      <td>pascal</td>
-      <td>a procedural programming language commonly used as a teaching language.</td>
-    </tr>
-    <tr>
-      <td>perl</td>
-      <td>The Perl scripting language (perl.org) [aliases: pl]</td>
-    </tr>
-    <tr>
-      <td>php</td>
-      <td>The PHP scripting language (php.net) [aliases: php,php3,php4,php5]</td>
-    </tr>
-    <tr>
-      <td>plaintext</td>
-      <td>A boring lexer that doesn&#39;t highlight anything [aliases: text]</td>
-    </tr>
-    <tr>
-      <td>plist</td>
-      <td>plist [aliases: plist]</td>
-    </tr>
-    <tr>
-      <td>plsql</td>
-      <td>Procedural Language Structured Query Language for Oracle relational database</td>
-    </tr>
-    <tr>
-      <td>pony</td>
-      <td></td>
-    </tr>
-    <tr>
-      <td>postscript</td>
-      <td>The PostScript language (adobe.com/devnet/postscript.html) [aliases: postscr,postscript,ps,eps]</td>
-    </tr>
-    <tr>
-      <td>powershell</td>
-      <td>powershell [aliases: posh,microsoftshell,msshell]</td>
-    </tr>
-    <tr>
-      <td>praat</td>
-      <td>The Praat scripting language (praat.org)</td>
-    </tr>
-    <tr>
-      <td>prolog</td>
-      <td>The Prolog programming language (http://en.wikipedia.org/wiki/Prolog) [aliases: prolog]</td>
-    </tr>
-    <tr>
-      <td>prometheus</td>
-      <td>prometheus [aliases: prometheus]</td>
-    </tr>
-    <tr>
-      <td>properties</td>
-      <td>.properties config files for Java</td>
-    </tr>
-    <tr>
-      <td>protobuf</td>
-      <td>Google&#39;s language-neutral, platform-neutral, extensible mechanism for serializing structured data [aliases: proto]</td>
-    </tr>
-    <tr>
-      <td>puppet</td>
-      <td>The Puppet configuration management language (puppetlabs.org) [aliases: pp]</td>
-    </tr>
-    <tr>
-      <td>python</td>
-      <td>The Python programming language (python.org) [aliases: py]</td>
-    </tr>
-    <tr>
-      <td>q</td>
-      <td>The Q programming language (kx.com) [aliases: kdb+]</td>
-    </tr>
-    <tr>
-      <td>qml</td>
-      <td>QML, a UI markup language [aliases: qml]</td>
-    </tr>
-    <tr>
-      <td>r</td>
-      <td>The R statistics language (r-project.org) [aliases: r,R,s,S]</td>
-    </tr>
-    <tr>
-      <td>racket</td>
-      <td>Racket is a Lisp descended from Scheme (racket-lang.org)</td>
-    </tr>
-    <tr>
-      <td>reasonml</td>
-      <td>New syntax on top of OCaml ecosystem (reasonml.github.io)</td>
-    </tr>
-    <tr>
-      <td>rego</td>
-      <td>The Rego open-policy-agent (OPA) policy language (openpolicyagent.org)</td>
-    </tr>
-    <tr>
-      <td>rescript</td>
-      <td>The ReScript programming language (rescript-lang.org)</td>
-    </tr>
-    <tr>
-      <td>rml</td>
-      <td>A system agnostic domain-specific language for runtime monitoring and verification (https://rmlatdibris.github.io/)</td>
-    </tr>
-    <tr>
-      <td>robot_framework</td>
-      <td>Robot Framework is a generic open source automation testing framework (robotframework.org) [aliases: robot,robot-framework]</td>
-    </tr>
-    <tr>
-      <td>ruby</td>
-      <td>The Ruby programming language (ruby-lang.org) [aliases: rb]</td>
-    </tr>
-    <tr>
-      <td>rust</td>
-      <td>The Rust programming language (rust-lang.org) [aliases: rs,rust,no_run,rs,no_run,rust,ignore,rs,ignore,rust,should_panic,rs,should_panic]</td>
-    </tr>
-    <tr>
-      <td>sas</td>
-      <td>SAS (Statistical Analysis Software)</td>
-    </tr>
-    <tr>
-      <td>sass</td>
-      <td>The Sass stylesheet language language (sass-lang.com)</td>
-    </tr>
-    <tr>
-      <td>scala</td>
-      <td>The Scala programming language (scala-lang.org) [aliases: scala]</td>
-    </tr>
-    <tr>
-      <td>scheme</td>
-      <td>The Scheme variant of Lisp</td>
-    </tr>
-    <tr>
-      <td>scss</td>
-      <td>SCSS stylesheets (sass-lang.com)</td>
-    </tr>
-    <tr>
-      <td>sed</td>
-      <td>sed, the ultimate stream editor</td>
-    </tr>
-    <tr>
-      <td>shell</td>
-      <td>Various shell languages, including sh and bash [aliases: bash,zsh,ksh,sh]</td>
-    </tr>
-    <tr>
-      <td>sieve</td>
-      <td>mail filtering language</td>
-    </tr>
-    <tr>
-      <td>slice</td>
-      <td>Specification Language for Ice (doc.zeroc.com)</td>
-    </tr>
-    <tr>
-      <td>slim</td>
-      <td>The Slim template language</td>
-    </tr>
-    <tr>
-      <td>smalltalk</td>
-      <td>The Smalltalk programming language [aliases: st,squeak]</td>
-    </tr>
-    <tr>
-      <td>smarty</td>
-      <td>Smarty Template Engine [aliases: smarty]</td>
-    </tr>
-    <tr>
-      <td>sml</td>
-      <td>Standard ML [aliases: ml]</td>
-    </tr>
-    <tr>
-      <td>sparql</td>
-      <td>Semantic Query Language, for RDF data</td>
-    </tr>
-    <tr>
-      <td>sqf</td>
-      <td>Status Quo Function, a Real Virtuality engine scripting language</td>
-    </tr>
-    <tr>
-      <td>sql</td>
-      <td>Structured Query Language, for relational databases</td>
-    </tr>
-    <tr>
-      <td>ssh</td>
-      <td>A lexer for SSH configuration files</td>
-    </tr>
-    <tr>
-      <td>stan</td>
-      <td>Stan Modeling Language (mc-stan.org)</td>
-    </tr>
-    <tr>
-      <td>stata</td>
-      <td>The Stata programming language (www.stata.com)</td>
-    </tr>
-    <tr>
-      <td>supercollider</td>
-      <td>A cross-platform interpreted programming language for sound synthesis, algorithmic composition, and realtime performance</td>
-    </tr>
-    <tr>
-      <td>svelte</td>
-      <td>Svelte single-file components (https://svelte.dev/)</td>
-    </tr>
-    <tr>
-      <td>swift</td>
-      <td>Multi paradigm, compiled programming language developed by Apple for iOS and OS X development. (developer.apple.com/swift)</td>
-    </tr>
-    <tr>
-      <td>systemd</td>
-      <td>A lexer for systemd unit files [aliases: unit-file]</td>
-    </tr>
-    <tr>
-      <td>syzlang</td>
-      <td>Syscall description language used by syzkaller</td>
-    </tr>
-    <tr>
-      <td>syzprog</td>
-      <td>Program description language used by syzkaller</td>
-    </tr>
-    <tr>
-      <td>tap</td>
-      <td>Test Anything Protocol [aliases: tap]</td>
-    </tr>
-    <tr>
-      <td>tcl</td>
-      <td>The Tool Command Language (tcl.tk)</td>
-    </tr>
-    <tr>
-      <td>terraform</td>
-      <td>Terraform HCL Interpolations [aliases: tf]</td>
-    </tr>
-    <tr>
-      <td>tex</td>
-      <td>The TeX typesetting system [aliases: TeX,LaTeX,latex]</td>
-    </tr>
-    <tr>
-      <td>toml</td>
-      <td>the TOML configuration format (https://github.com/toml-lang/toml)</td>
-    </tr>
-    <tr>
-      <td>tsx</td>
-      <td>TypeScript-compatible JSX (www.typescriptlang.org/docs/handbook/jsx.html)</td>
-    </tr>
-    <tr>
-      <td>ttcn3</td>
-      <td>The TTCN3 programming language (ttcn-3.org)</td>
-    </tr>
-    <tr>
-      <td>tulip</td>
-      <td>the tulip programming language (twitter.com/tuliplang) [aliases: tulip]</td>
-    </tr>
-    <tr>
-      <td>turtle</td>
-      <td>Terse RDF Triple Language, TriG</td>
-    </tr>
-    <tr>
-      <td>twig</td>
-      <td>Twig template engine (twig.sensiolabs.org)</td>
-    </tr>
-    <tr>
-      <td>typescript</td>
-      <td>TypeScript, a superset of JavaScript (https://www.typescriptlang.org/) [aliases: ts]</td>
-    </tr>
-    <tr>
-      <td>vala</td>
-      <td>A programming language similar to csharp.</td>
-    </tr>
-    <tr>
-      <td>vb</td>
-      <td>Visual Basic [aliases: visualbasic]</td>
-    </tr>
-    <tr>
-      <td>vcl</td>
-      <td>The configuration language for Varnish HTTP Cache (varnish-cache.org) [aliases: varnishconf,varnish]</td>
-    </tr>
-    <tr>
-      <td>velocity</td>
-      <td>Velocity is a Java-based template engine (velocity.apache.org)</td>
-    </tr>
-    <tr>
-      <td>verilog</td>
-      <td>The System Verilog hardware description language</td>
-    </tr>
-    <tr>
-      <td>vhdl</td>
-      <td>Very High Speed Integrated Circuit Hardware Description Language</td>
-    </tr>
-    <tr>
-      <td>viml</td>
-      <td>VimL, the scripting language for the Vim editor (vim.org) [aliases: vim,vimscript,ex]</td>
-    </tr>
-    <tr>
-      <td>vue</td>
-      <td>Vue.js single-file components [aliases: vuejs]</td>
-    </tr>
-    <tr>
-      <td>wollok</td>
-      <td>Wollok lang</td>
-    </tr>
-    <tr>
-      <td>xml</td>
-      <td>&lt;desc for=&quot;this-lexer&quot;&gt;XML&lt;/desc&gt;</td>
-    </tr>
-    <tr>
-      <td>xojo</td>
-      <td>Xojo [aliases: realbasic]</td>
-    </tr>
-    <tr>
-      <td>xpath</td>
-      <td>XML Path Language (XPath) 3.1</td>
-    </tr>
-    <tr>
-      <td>xquery</td>
-      <td>XQuery 3.1: An XML Query Language</td>
-    </tr>
-    <tr>
-      <td>yaml</td>
-      <td>Yaml Ain&#39;t Markup Language (yaml.org) [aliases: yml]</td>
-    </tr>
-    <tr>
-      <td>yang</td>
-      <td>Lexer for the YANG 1.1 modeling language (RFC7950)</td>
-    </tr>
-    <tr>
-      <td>zig</td>
-      <td>The Zig programming language (ziglang.org) [aliases: zir]</td>
-    </tr>
+    <% @available_lexers.each do |lexer| %>
+      <tr>
+        <td><%= lexer.tag %></td>
+        <td>
+          <%= lexer.desc %>
+          <%= " [aliases: #{lexer.aliases.uniq.join(', ')}]" if lexer.aliases.any? %>
+        </td>
+      </tr>
+    <% end %>
   </table>
 </body>
 </html>
index c988ce7f0c6f091461c7dead64ee9b3f0bc88035..153a6d5184abe4fc18168decfc6ce213a97f13dc 100644 (file)
@@ -87,5 +87,13 @@ class HelpControllerTest < Redmine::ControllerTest
     assert_response :success
 
     assert_select 'h1', :text =>  "List of languages supported by Redmine code highlighter"
+
+    # 1-based index + 1 for the header row
+    index = Rouge::Lexer.all.sort_by(&:tag).index(Rouge::Lexers::Ruby) + 2
+    assert_select "table tr:nth-of-type(#{index})" do
+      assert_select '>td:nth-of-type(1)', :text => 'ruby'
+      assert_select '>td:nth-of-type(2)', :text => /The Ruby programming language/
+      assert_select '>td:nth-of-type(2)', :text => /\[aliases: rb\]/
+    end
   end
 end