summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/MediaWiki.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/MediaWiki.hs')
-rw-r--r--src/Text/Pandoc/Writers/MediaWiki.hs781
1 files changed, 709 insertions, 72 deletions
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs
index 78d4651e7..2470d9200 100644
--- a/src/Text/Pandoc/Writers/MediaWiki.hs
+++ b/src/Text/Pandoc/Writers/MediaWiki.hs
@@ -1,5 +1,5 @@
{-
-Copyright (C) 2008-2015 John MacFarlane <jgm@berkeley.edu>
+Copyright (C) 2008-2018 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{- |
Module : Text.Pandoc.Writers.MediaWiki
- Copyright : Copyright (C) 2008-2015 John MacFarlane
+ Copyright : Copyright (C) 2008-2018 John MacFarlane
License : GNU GPL, version 2 or above
Maintainer : John MacFarlane <jgm@berkeley.edu>
@@ -30,41 +30,44 @@ Conversion of 'Pandoc' documents to MediaWiki markup.
MediaWiki: <http://www.mediawiki.org/wiki/MediaWiki>
-}
module Text.Pandoc.Writers.MediaWiki ( writeMediaWiki ) where
+import Control.Monad.Reader
+import Control.Monad.State.Strict
+import Data.List (intercalate)
+import qualified Data.Set as Set
+import Data.Text (Text, pack)
+import Text.Pandoc.Class (PandocMonad, report)
import Text.Pandoc.Definition
+import Text.Pandoc.ImageSize
+import Text.Pandoc.Logging
import Text.Pandoc.Options
-import Text.Pandoc.Shared
-import Text.Pandoc.Writers.Shared
import Text.Pandoc.Pretty (render)
-import Text.Pandoc.ImageSize
+import Text.Pandoc.Shared
import Text.Pandoc.Templates (renderTemplate')
-import Text.Pandoc.XML ( escapeStringForXML )
-import Data.List ( intersect, intercalate )
-import Network.URI ( isURI )
-import Control.Monad.Reader
-import Control.Monad.State
+import Text.Pandoc.Writers.Shared
+import Text.Pandoc.XML (escapeStringForXML)
data WriterState = WriterState {
- stNotes :: Bool -- True if there are notes
- , stOptions :: WriterOptions -- writer options
+ stNotes :: Bool -- True if there are notes
+ , stOptions :: WriterOptions -- writer options
}
data WriterReader = WriterReader {
- options :: WriterOptions -- Writer options
- , listLevel :: String -- String at beginning of list items, e.g. "**"
- , useTags :: Bool -- True if we should use HTML tags because we're in a complex list
+ options :: WriterOptions -- Writer options
+ , listLevel :: String -- String at beginning of list items, e.g. "**"
+ , useTags :: Bool -- True if we should use HTML tags because we're in a complex list
}
-type MediaWikiWriter = ReaderT WriterReader (State WriterState)
+type MediaWikiWriter m = ReaderT WriterReader (StateT WriterState m)
-- | Convert Pandoc to MediaWiki.
-writeMediaWiki :: WriterOptions -> Pandoc -> String
+writeMediaWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeMediaWiki opts document =
let initialState = WriterState { stNotes = False, stOptions = opts }
env = WriterReader { options = opts, listLevel = [], useTags = False }
- in evalState (runReaderT (pandocToMediaWiki document) env) initialState
+ in evalStateT (runReaderT (pandocToMediaWiki document) env) initialState
-- | Return MediaWiki representation of document.
-pandocToMediaWiki :: Pandoc -> MediaWikiWriter String
+pandocToMediaWiki :: PandocMonad m => Pandoc -> MediaWikiWriter m Text
pandocToMediaWiki (Pandoc meta blocks) = do
opts <- asks options
metadata <- metaToJSON opts
@@ -79,8 +82,8 @@ pandocToMediaWiki (Pandoc meta blocks) = do
let main = body ++ notes
let context = defField "body" main
$ defField "toc" (writerTableOfContents opts) metadata
- return $ case writerTemplate opts of
- Nothing -> main
+ pack <$> case writerTemplate opts of
+ Nothing -> return main
Just tpl -> renderTemplate' tpl context
-- | Escape special characters for MediaWiki.
@@ -88,8 +91,9 @@ escapeString :: String -> String
escapeString = escapeStringForXML
-- | Convert Pandoc block element to MediaWiki.
-blockToMediaWiki :: Block -- ^ Block element
- -> MediaWikiWriter String
+blockToMediaWiki :: PandocMonad m
+ => Block -- ^ Block element
+ -> MediaWikiWriter m String
blockToMediaWiki Null = return ""
@@ -123,10 +127,10 @@ blockToMediaWiki (Para inlines) = do
blockToMediaWiki (LineBlock lns) =
blockToMediaWiki $ linesToPara lns
-blockToMediaWiki (RawBlock f str)
+blockToMediaWiki b@(RawBlock f str)
| f == Format "mediawiki" = return str
| f == Format "html" = return str
- | otherwise = return ""
+ | otherwise = "" <$ report (BlockNotRendered b)
blockToMediaWiki HorizontalRule = return "\n-----\n"
@@ -136,23 +140,15 @@ blockToMediaWiki (Header level _ inlines) = do
return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
blockToMediaWiki (CodeBlock (_,classes,_) str) = do
- let at = classes `intersect` ["actionscript", "ada", "apache", "applescript", "asm", "asp",
- "autoit", "bash", "blitzbasic", "bnf", "c", "c_mac", "caddcl", "cadlisp", "cfdg", "cfm",
- "cpp", "cpp-qt", "csharp", "css", "d", "delphi", "diff", "div", "dos", "eiffel", "fortran",
- "freebasic", "gml", "groovy", "html4strict", "idl", "ini", "inno", "io", "java", "java5",
- "javascript", "latex", "lisp", "lua", "matlab", "mirc", "mpasm", "mysql", "nsis", "objc",
- "ocaml", "ocaml-brief", "oobas", "oracle8", "pascal", "perl", "php", "php-brief", "plsql",
- "python", "qbasic", "rails", "reg", "robots", "ruby", "sas", "scheme", "sdlbasic",
- "smalltalk", "smarty", "sql", "tcl", "", "thinbasic", "tsql", "vb", "vbnet", "vhdl",
- "visualfoxpro", "winbatch", "xml", "xpp", "z80"]
+ let at = Set.fromList classes `Set.intersection` highlightingLangs
return $
- if null at
- then "<pre" ++ (if null classes
- then ">"
- else " class=\"" ++ unwords classes ++ "\">") ++
- escapeString str ++ "</pre>"
- else "<source lang=\"" ++ head at ++ "\">" ++ str ++ "</source>"
- -- note: no escape!
+ case Set.toList at of
+ [] -> "<pre" ++ (if null classes
+ then ">"
+ else " class=\"" ++ unwords classes ++ "\">") ++
+ escapeString str ++ "</pre>"
+ (l:_) -> "<source lang=\"" ++ l ++ "\">" ++ str ++ "</source>"
+ -- note: no escape! even for <!
blockToMediaWiki (BlockQuote blocks) = do
contents <- blockListToMediaWiki blocks
@@ -218,7 +214,7 @@ listAttribsToString (startnum, numstyle, _) =
else "")
-- | Convert bullet or ordered list item (list of blocks) to MediaWiki.
-listItemToMediaWiki :: [Block] -> MediaWikiWriter String
+listItemToMediaWiki :: PandocMonad m => [Block] -> MediaWikiWriter m String
listItemToMediaWiki items = do
contents <- blockListToMediaWiki items
tags <- asks useTags
@@ -229,8 +225,9 @@ listItemToMediaWiki items = do
return $ marker ++ " " ++ contents
-- | Convert definition list item (label, list of blocks) to MediaWiki.
-definitionListItemToMediaWiki :: ([Inline],[[Block]])
- -> MediaWikiWriter String
+definitionListItemToMediaWiki :: PandocMonad m
+ => ([Inline],[[Block]])
+ -> MediaWikiWriter m String
definitionListItemToMediaWiki (label, items) = do
labelText <- inlineListToMediaWiki label
contents <- mapM blockListToMediaWiki items
@@ -259,18 +256,18 @@ isSimpleListItem :: [Block] -> Bool
isSimpleListItem [] = True
isSimpleListItem [x] =
case x of
- Plain _ -> True
- Para _ -> True
- BulletList _ -> isSimpleList x
- OrderedList _ _ -> isSimpleList x
- DefinitionList _ -> isSimpleList x
- _ -> False
+ Plain _ -> True
+ Para _ -> True
+ BulletList _ -> isSimpleList x
+ OrderedList _ _ -> isSimpleList x
+ DefinitionList _ -> isSimpleList x
+ _ -> False
isSimpleListItem [x, y] | isPlainOrPara x =
case y of
- BulletList _ -> isSimpleList y
- OrderedList _ _ -> isSimpleList y
- DefinitionList _ -> isSimpleList y
- _ -> False
+ BulletList _ -> isSimpleList y
+ OrderedList _ _ -> isSimpleList y
+ DefinitionList _ -> isSimpleList y
+ _ -> False
isSimpleListItem _ = False
isPlainOrPara :: Block -> Bool
@@ -284,20 +281,22 @@ vcat = intercalate "\n"
-- Auxiliary functions for tables:
-tableRowToMediaWiki :: Bool
+tableRowToMediaWiki :: PandocMonad m
+ => Bool
-> [Alignment]
-> [Double]
-> (Int, [[Block]])
- -> MediaWikiWriter String
+ -> MediaWikiWriter m String
tableRowToMediaWiki headless alignments widths (rownum, cells) = do
cells' <- mapM (tableCellToMediaWiki headless rownum)
$ zip3 alignments widths cells
return $ unlines cells'
-tableCellToMediaWiki :: Bool
+tableCellToMediaWiki :: PandocMonad m
+ => Bool
-> Int
-> (Alignment, Double, [Block])
- -> MediaWikiWriter String
+ -> MediaWikiWriter m String
tableCellToMediaWiki headless rownum (alignment, width, bs) = do
contents <- blockListToMediaWiki bs
let marker = if rownum == 1 && not headless then "!" else "|"
@@ -322,13 +321,13 @@ alignmentToString alignment = case alignment of
AlignCenter -> "center"
AlignDefault -> "left"
-imageToMediaWiki :: Attr -> MediaWikiWriter String
+imageToMediaWiki :: PandocMonad m => Attr -> MediaWikiWriter m String
imageToMediaWiki attr = do
opts <- gets stOptions
let (_, cls, _) = attr
toPx = fmap (showInPixel opts) . checkPct
checkPct (Just (Percent _)) = Nothing
- checkPct maybeDim = maybeDim
+ checkPct maybeDim = maybeDim
go (Just w) Nothing = '|':w ++ "px"
go (Just w) (Just h) = '|':w ++ "x" ++ h ++ "px"
go Nothing (Just h) = "|x" ++ h ++ "px"
@@ -340,18 +339,19 @@ imageToMediaWiki attr = do
return $ dims ++ classes
-- | Convert list of Pandoc block elements to MediaWiki.
-blockListToMediaWiki :: [Block] -- ^ List of block elements
- -> MediaWikiWriter String
+blockListToMediaWiki :: PandocMonad m
+ => [Block] -- ^ List of block elements
+ -> MediaWikiWriter m String
blockListToMediaWiki blocks =
fmap vcat $ mapM blockToMediaWiki blocks
-- | Convert list of Pandoc inline elements to MediaWiki.
-inlineListToMediaWiki :: [Inline] -> MediaWikiWriter String
+inlineListToMediaWiki :: PandocMonad m => [Inline] -> MediaWikiWriter m String
inlineListToMediaWiki lst =
fmap concat $ mapM inlineToMediaWiki lst
-- | Convert Pandoc inline element to MediaWiki.
-inlineToMediaWiki :: Inline -> MediaWikiWriter String
+inlineToMediaWiki :: PandocMonad m => Inline -> MediaWikiWriter m String
inlineToMediaWiki (Span attrs ils) = do
contents <- inlineListToMediaWiki ils
@@ -394,22 +394,28 @@ inlineToMediaWiki (Code _ str) =
inlineToMediaWiki (Str str) = return $ escapeString str
-inlineToMediaWiki (Math _ str) = return $ "<math>" ++ str ++ "</math>"
- -- note: str should NOT be escaped
+inlineToMediaWiki (Math mt str) = return $
+ "<math display=\"" ++
+ (if mt == DisplayMath then "block" else "inline") ++
+ "\">" ++ str ++ "</math>"
+ -- note: str should NOT be escaped
-inlineToMediaWiki (RawInline f str)
+inlineToMediaWiki il@(RawInline f str)
| f == Format "mediawiki" = return str
| f == Format "html" = return str
- | otherwise = return ""
+ | otherwise = "" <$ report (InlineNotRendered il)
-inlineToMediaWiki (LineBreak) = return "<br />\n"
+inlineToMediaWiki LineBreak = return "<br />\n"
inlineToMediaWiki SoftBreak = do
wrapText <- gets (writerWrapText . stOptions)
+ listlevel <- asks listLevel
case wrapText of
WrapAuto -> return " "
WrapNone -> return " "
- WrapPreserve -> return "\n"
+ WrapPreserve -> if null listlevel
+ then return "\n"
+ else return " "
inlineToMediaWiki Space = return " "
@@ -437,5 +443,636 @@ inlineToMediaWiki (Image attr alt (source, tit)) = do
inlineToMediaWiki (Note contents) = do
contents' <- blockListToMediaWiki contents
modify (\s -> s { stNotes = True })
- return $ "<ref>" ++ contents' ++ "</ref>"
- -- note - may not work for notes with multiple blocks
+ return $ "<ref>" ++ stripTrailingNewlines contents' ++ "</ref>"
+ -- note - does not work for notes with multiple blocks
+
+highlightingLangs :: Set.Set String
+highlightingLangs = Set.fromList [
+ "abap",
+ "abl",
+ "abnf",
+ "aconf",
+ "actionscript",
+ "actionscript3",
+ "ada",
+ "ada2005",
+ "ada95",
+ "adl",
+ "agda",
+ "ahk",
+ "alloy",
+ "ambienttalk",
+ "ambienttalk/2",
+ "antlr",
+ "antlr-actionscript",
+ "antlr-as",
+ "antlr-c#",
+ "antlr-cpp",
+ "antlr-csharp",
+ "antlr-java",
+ "antlr-objc",
+ "antlr-perl",
+ "antlr-python",
+ "antlr-rb",
+ "antlr-ruby",
+ "apache",
+ "apacheconf",
+ "apl",
+ "applescript",
+ "arduino",
+ "arexx",
+ "as",
+ "as3",
+ "asm",
+ "aspectj",
+ "aspx-cs",
+ "aspx-vb",
+ "asy",
+ "asymptote",
+ "at",
+ "autohotkey",
+ "autoit",
+ "awk",
+ "b3d",
+ "basemake",
+ "bash",
+ "basic",
+ "bat",
+ "batch",
+ "bbcode",
+ "because",
+ "befunge",
+ "bf",
+ "blitzbasic",
+ "blitzmax",
+ "bmax",
+ "bnf",
+ "boo",
+ "boogie",
+ "bplus",
+ "brainfuck",
+ "bro",
+ "bsdmake",
+ "bugs",
+ "c",
+ "c#",
+ "c++",
+ "c++-objdumb",
+ "c-objdump",
+ "ca65",
+ "cadl",
+ "camkes",
+ "cbmbas",
+ "ceylon",
+ "cf3",
+ "cfc",
+ "cfengine3",
+ "cfg",
+ "cfm",
+ "cfs",
+ "chai",
+ "chaiscript",
+ "chapel",
+ "cheetah",
+ "chpl",
+ "cirru",
+ "cl",
+ "clay",
+ "clipper",
+ "clj",
+ "cljs",
+ "clojure",
+ "clojurescript",
+ "cmake",
+ "cobol",
+ "cobolfree",
+ "coffee",
+ "coffee-script",
+ "coffeescript",
+ "common-lisp",
+ "componentpascal",
+ "console",
+ "control",
+ "coq",
+ "cp",
+ "cpp",
+ "cpp-objdump",
+ "cpsa",
+ "crmsh",
+ "croc",
+ "cry",
+ "cryptol",
+ "csh",
+ "csharp",
+ "csound",
+ "csound-csd",
+ "csound-document",
+ "csound-orc",
+ "csound-sco",
+ "csound-score",
+ "css",
+ "css+django",
+ "css+erb",
+ "css+genshi",
+ "css+genshitext",
+ "css+jinja",
+ "css+lasso",
+ "css+mako",
+ "css+mozpreproc",
+ "css+myghty",
+ "css+php",
+ "css+ruby",
+ "css+smarty",
+ "cu",
+ "cucumber",
+ "cuda",
+ "cxx-objdump",
+ "cypher",
+ "cython",
+ "d",
+ "d-objdump",
+ "dart",
+ "debcontrol",
+ "debsources",
+ "delphi",
+ "dg",
+ "diff",
+ "django",
+ "docker",
+ "dockerfile",
+ "dosbatch",
+ "doscon",
+ "dosini",
+ "dpatch",
+ "dtd",
+ "duby",
+ "duel",
+ "dylan",
+ "dylan-console",
+ "dylan-lid",
+ "dylan-repl",
+ "earl-grey",
+ "earlgrey",
+ "easytrieve",
+ "ebnf",
+ "ec",
+ "ecl",
+ "eg",
+ "eiffel",
+ "elisp",
+ "elixir",
+ "elm",
+ "emacs",
+ "erb",
+ "erl",
+ "erlang",
+ "evoque",
+ "ex",
+ "exs",
+ "ezhil",
+ "factor",
+ "fan",
+ "fancy",
+ "felix",
+ "fish",
+ "fishshell",
+ "flx",
+ "fortran",
+ "fortranfixed",
+ "foxpro",
+ "fsharp",
+ "fy",
+ "gap",
+ "gas",
+ "gawk",
+ "genshi",
+ "genshitext",
+ "gherkin",
+ "glsl",
+ "gnuplot",
+ "go",
+ "golo",
+ "gooddata-cl",
+ "gosu",
+ "groff",
+ "groovy",
+ "gst",
+ "haml",
+ "handlebars",
+ "haskell",
+ "haxe",
+ "haxeml",
+ "hexdump",
+ "hs",
+ "html",
+ "html+cheetah",
+ "html+django",
+ "html+erb",
+ "html+evoque",
+ "html+genshi",
+ "html+handlebars",
+ "html+jinja",
+ "html+kid",
+ "html+lasso",
+ "html+mako",
+ "html+myghty",
+ "html+php",
+ "html+ruby",
+ "html+smarty",
+ "html+spitfire",
+ "html+twig",
+ "html+velocity",
+ "htmlcheetah",
+ "htmldjango",
+ "http",
+ "hx",
+ "hxml",
+ "hxsl",
+ "hy",
+ "hybris",
+ "hylang",
+ "i6",
+ "i6t",
+ "i7",
+ "idl",
+ "idl4",
+ "idr",
+ "idris",
+ "iex",
+ "igor",
+ "igorpro",
+ "ik",
+ "inform6",
+ "inform7",
+ "ini",
+ "io",
+ "ioke",
+ "irb",
+ "irc",
+ "isabelle",
+ "j",
+ "jade",
+ "jags",
+ "jasmin",
+ "jasminxt",
+ "java",
+ "javascript",
+ "javascript+cheetah",
+ "javascript+django",
+ "javascript+erb",
+ "javascript+genshi",
+ "javascript+genshitext",
+ "javascript+jinja",
+ "javascript+lasso",
+ "javascript+mako",
+ "javascript+mozpreproc",
+ "javascript+myghty",
+ "javascript+php",
+ "javascript+ruby",
+ "javascript+smarty",
+ "javascript+spitfire",
+ "jbst",
+ "jcl",
+ "jinja",
+ "jl",
+ "jlcon",
+ "jproperties",
+ "js",
+ "js+cheetah",
+ "js+django",
+ "js+erb",
+ "js+genshi",
+ "js+genshitext",
+ "js+jinja",
+ "js+lasso",
+ "js+mako",
+ "js+myghty",
+ "js+php",
+ "js+ruby",
+ "js+smarty",
+ "js+spitfire",
+ "json",
+ "json-ld",
+ "jsonld",
+ "jsonml+bst",
+ "jsp",
+ "julia",
+ "kal",
+ "kconfig",
+ "kernel-config",
+ "kid",
+ "koka",
+ "kotlin",
+ "ksh",
+ "lagda",
+ "lasso",
+ "lassoscript",
+ "latex",
+ "lcry",
+ "lcryptol",
+ "lean",
+ "less",
+ "lhaskell",
+ "lhs",
+ "lid",
+ "lidr",
+ "lidris",
+ "lighttpd",
+ "lighty",
+ "limbo",
+ "linux-config",
+ "liquid",
+ "lisp",
+ "literate-agda",
+ "literate-cryptol",
+ "literate-haskell",
+ "literate-idris",
+ "live-script",
+ "livescript",
+ "llvm",
+ "logos",
+ "logtalk",
+ "lsl",
+ "lua",
+ "m2",
+ "make",
+ "makefile",
+ "mako",
+ "man",
+ "maql",
+ "mask",
+ "mason",
+ "mathematica",
+ "matlab",
+ "matlabsession",
+ "mawk",
+ "menuconfig",
+ "mf",
+ "minid",
+ "mma",
+ "modelica",
+ "modula2",
+ "moin",
+ "monkey",
+ "moo",
+ "moocode",
+ "moon",
+ "moonscript",
+ "mozhashpreproc",
+ "mozpercentpreproc",
+ "mq4",
+ "mq5",
+ "mql",
+ "mql4",
+ "mql5",
+ "msc",
+ "mscgen",
+ "mupad",
+ "mxml",
+ "myghty",
+ "mysql",
+ "nasm",
+ "nawk",
+ "nb",
+ "nemerle",
+ "nesc",
+ "newlisp",
+ "newspeak",
+ "nginx",
+ "nim",
+ "nimrod",
+ "nit",
+ "nix",
+ "nixos",
+ "nroff",
+ "nsh",
+ "nsi",
+ "nsis",
+ "numpy",
+ "obj-c",
+ "obj-c++",
+ "obj-j",
+ "objc",
+ "objc++",
+ "objdump",
+ "objdump-nasm",
+ "objective-c",
+ "objective-c++",
+ "objective-j",
+ "objectivec",
+ "objectivec++",
+ "objectivej",
+ "objectpascal",
+ "objj",
+ "ocaml",
+ "octave",
+ "odin",
+ "ooc",
+ "opa",
+ "openbugs",
+ "openedge",
+ "pacmanconf",
+ "pan",
+ "parasail",
+ "pas",
+ "pascal",
+ "pawn",
+ "pcmk",
+ "perl",
+ "perl6",
+ "php",
+ "php3",
+ "php4",
+ "php5",
+ "pig",
+ "pike",
+ "pkgconfig",
+ "pl",
+ "pl6",
+ "plpgsql",
+ "po",
+ "posh",
+ "postgres",
+ "postgres-console",
+ "postgresql",
+ "postgresql-console",
+ "postscr",
+ "postscript",
+ "pot",
+ "pov",
+ "powershell",
+ "praat",
+ "progress",
+ "prolog",
+ "properties",
+ "proto",
+ "protobuf",
+ "ps1",
+ "ps1con",
+ "psm1",
+ "psql",
+ "puppet",
+ "py",
+ "py3",
+ "py3tb",
+ "pycon",
+ "pypy",
+ "pypylog",
+ "pyrex",
+ "pytb",
+ "python",
+ "python3",
+ "pyx",
+ "qbasic",
+ "qbs",
+ "qml",
+ "qvt",
+ "qvto",
+ "r",
+ "racket",
+ "ragel",
+ "ragel-c",
+ "ragel-cpp",
+ "ragel-d",
+ "ragel-em",
+ "ragel-java",
+ "ragel-objc",
+ "ragel-rb",
+ "ragel-ruby",
+ "raw",
+ "rb",
+ "rbcon",
+ "rconsole",
+ "rd",
+ "rebol",
+ "red",
+ "red/system",
+ "redcode",
+ "registry",
+ "resource",
+ "resourcebundle",
+ "rest",
+ "restructuredtext",
+ "rexx",
+ "rhtml",
+ "rkt",
+ "roboconf-graph",
+ "roboconf-instances",
+ "robotframework",
+ "rout",
+ "rql",
+ "rsl",
+ "rst",
+ "rts",
+ "ruby",
+ "rust",
+ "s",
+ "sage",
+ "salt",
+ "sass",
+ "sc",
+ "scala",
+ "scaml",
+ "scheme",
+ "scilab",
+ "scm",
+ "scss",
+ "sh",
+ "shell",
+ "shell-session",
+ "shen",
+ "slim",
+ "sls",
+ "smali",
+ "smalltalk",
+ "smarty",
+ "sml",
+ "snobol",
+ "sources.list",
+ "sourceslist",
+ "sp",
+ "sparql",
+ "spec",
+ "spitfire",
+ "splus",
+ "sql",
+ "sqlite3",
+ "squeak",
+ "squid",
+ "squid.conf",
+ "squidconf",
+ "ssp",
+ "st",
+ "stan",
+ "supercollider",
+ "sv",
+ "swift",
+ "swig",
+ "systemverilog",
+ "tads3",
+ "tap",
+ "tcl",
+ "tcsh",
+ "tcshcon",
+ "tea",
+ "termcap",
+ "terminfo",
+ "terraform",
+ "tex",
+ "text",
+ "tf",
+ "thrift",
+ "todotxt",
+ "trac-wiki",
+ "trafficscript",
+ "treetop",
+ "ts",
+ "turtle",
+ "twig",
+ "typescript",
+ "udiff",
+ "urbiscript",
+ "v",
+ "vala",
+ "vapi",
+ "vb.net",
+ "vbnet",
+ "vctreestatus",
+ "velocity",
+ "verilog",
+ "vfp",
+ "vgl",
+ "vhdl",
+ "vim",
+ "winbatch",
+ "winbugs",
+ "x10",
+ "xbase",
+ "xml",
+ "xml+cheetah",
+ "xml+django",
+ "xml+erb",
+ "xml+evoque",
+ "xml+genshi",
+ "xml+jinja",
+ "xml+kid",
+ "xml+lasso",
+ "xml+mako",
+ "xml+myghty",
+ "xml+php",
+ "xml+ruby",
+ "xml+smarty",
+ "xml+spitfire",
+ "xml+velocity",
+ "xq",
+ "xql",
+ "xqm",
+ "xquery",
+ "xqy",
+ "xslt",
+ "xten",
+ "xtend",
+ "xul+mozpreproc",
+ "yaml",
+ "yaml+jinja",
+ "zephir" ]