Redmineのシンタックスハイライトの対応形式 (2023年更新)

 更新  •  分類:

Redmineのチケットの説明・注記・Wikiなどテキストを入力できる多くの箇所で、ソースコードの予約語などに色をつけてわかりやすく表示するシンタックスハイライト機能が利用できます。

シンタックスハイライトの利用方法

ソースコードの周囲に専用の記述を行って言語の種類を指定するとハイライトされます。詳しくは Redmineでシンタックスハイライトを行うには をご覧ください。

Textile:

<pre><code class="csharp">
using System;

internal static class HelloWorld
{
    private static void Main()
    {
        Console.WriteLine("Hello, world!");
    }
}
</code></pre>

Markdown:

``` csharp
using System;

internal static class HelloWorld
{
    private static void Main()
    {
        Console.WriteLine("Hello, world!");
    }
}
```

シンタックスハイライト可能な言語

ハイライト用の記述では下記の一覧内の太字の言語名を指定します。

言語によっては「別名」として記載している名前も使用できます。例えば、C#の場合は csharp のほかに c#cs も使えます。

主要な言語

言語名 説明
batchfile Windowsバッチファイル [別名: bat,batch,dosbatch,winbatch]
c C
cpp C++ [別名: c++]
csharp C# [別名: c#,cs]
css CSS (スタイルシート)
diff diff/patch [別名: patch,udiff]
go Go [別名: go,golang]
groovy Groovy
java Java
javascript JavaScript [別名: js]
json JSON
matlab Matlab [別名: m]
objective_c Objective-C [別名: objc,obj-c,obj_c,objectivec]
pascal Pascal
perl Perl [別名: pl]
php PHP [別名: php,php3,php4,php5]
python Python (python.org) [別名: py]
r R [別名: r,R,s,S]
ruby Ruby [別名: rb]
shell シェルスクリプト [別名: bash,zsh,ksh,sh]
sql SQL
swift Swift
vb Visual Basic [別名: visualbasic]
xml XML
yaml YAML [別名: yml]

すべての対応言語一覧

対応言語はシンタックスハイライト用ライブラリ Rouge の対応言語に準じます。Redmine 5.0の場合はRouge 3.28が対応している209言語のハイライトが行えます。

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