Repository: sharkdp/bat (language: rust)

Issue:
MediaWiki syntax
<!--
BEFORE YOU MAKE A REQUEST:

Are you looking to add a new syntax to use on one of your devices?
Bat supports locally-installed language definitions. See the link below:

https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions

If you think adding this syntax would help others as well, please make sure that it meets our
guidelines for adding new syntaxes:

 - 10,000 downloads on packagecontrol.io
-->


**Syntax:**
[MediaWiki](https://en.wikipedia.org/wiki/Help:Wikitext)

**Guideline Criteria:**
https://packagecontrol.io/packages/Mediawiker

I think it would be useful to support the syntax highlighting of this, because this is used in many wikis such as [Wikipedia](https://www.wikipedia.org/).


Discussion / hints:

Fix patch:
diff --git a/.gitmodules b/.gitmodules
index 6a8f3c400d..5ea7bddde6 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -236,3 +236,6 @@
 [submodule "assets/syntaxes/02_Extra/Racket"]
 	path = assets/syntaxes/02_Extra/Racket
 	url = https://github.com/follesoe/sublime-racket.git
+[submodule "assets/syntaxes/02_Extra/MediaWiki"]
+	path = assets/syntaxes/02_Extra/MediaWiki
+	url = https://github.com/tosher/Mediawiker.git
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92fad76de1..41a08c0890 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,7 @@
 - Added support for `slim` syntax, see #1693 (@mfinelli)
 - Racket, see #1884 (@jubnzv)
 - LiveScript, see #1915 (@Enselic)
+- MediaWiki, see #1925 (@sorairolake)
 
 ## New themes
 
diff --git a/assets/patches/MediaWiki.sublime-syntax.patch b/assets/patches/MediaWiki.sublime-syntax.patch
new file mode 100644
index 0000000000..499941c95d
--- /dev/null
+++ b/assets/patches/MediaWiki.sublime-syntax.patch
@@ -0,0 +1,13 @@
+diff --git syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax
+index f542c9e..8eaf020 100644
+--- syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax
++++ syntaxes/02_Extra/MediaWiki/MediawikiNG.sublime-syntax
+@@ -1,7 +1,7 @@
+ %YAML 1.2
+ ---
+ # http://www.sublimetext.com/docs/3/syntax.html
+-name: Mediawiki NG
++name: MediaWiki
+ file_extensions: [mediawiki, wikipedia, wiki]
+ scope: text.html.mediawiki
+ 
diff --git a/assets/syntaxes/02_Extra/MediaWiki b/assets/syntaxes/02_Extra/MediaWiki
new file mode 160000
index 0000000000..843a483e8b
--- /dev/null
+++ b/assets/syntaxes/02_Extra/MediaWiki
@@ -0,0 +1,1 @@
+Subproject commit 843a483e8b9f18c4ba914f29a788db5b3a87ed11


Test patch:
diff --git a/tests/syntax-tests/highlighted/MediaWiki/test.mediawiki b/tests/syntax-tests/highlighted/MediaWiki/test.mediawiki
new file mode 100644
index 0000000000..c6d1e000de
--- /dev/null
+++ b/tests/syntax-tests/highlighted/MediaWiki/test.mediawiki
@@ -0,0 +1,37 @@
+[38;2;253;151;31m=[0m[38;2;253;151;31m Heading 1 [0m[38;2;253;151;31m=[0m
+[38;2;253;151;31m==[0m[38;2;253;151;31m Heading 2 [0m[38;2;253;151;31m==[0m
+[38;2;253;151;31m===[0m[38;2;253;151;31m Heading 3 [0m[38;2;253;151;31m===[0m
+[38;2;253;151;31m====[0m[38;2;253;151;31m Heading 4 [0m[38;2;253;151;31m====[0m
+[38;2;253;151;31m=====[0m[38;2;253;151;31m Heading 5 [0m[38;2;253;151;31m=====[0m
+[38;2;248;248;242m====== Heading 6 ======[0m
+
+[38;2;253;151;31m==[0m[38;2;253;151;31m Lists [0m[38;2;253;151;31m==[0m
+[38;2;248;248;242m*[0m[38;2;248;248;242m Unordered[0m
+[38;2;248;248;242m*[0m[38;2;248;248;242m lists[0m
+[38;2;248;248;242m**[0m[38;2;248;248;242m with nested[0m
+[38;2;248;248;242m***[0m[38;2;248;248;242m elements[0m
+
+[38;2;248;248;242m#[0m[38;2;248;248;242m Ordered[0m
+[38;2;248;248;242m#[0m[38;2;248;248;242m lists[0m
+[38;2;248;248;242m##[0m[38;2;248;248;242m with nested[0m
+[38;2;248;248;242m###[0m[38;2;248;248;242m elements[0m
+
+[38;2;248;248;242m;[0m[38;2;248;248;242m Description [0m[38;2;248;248;242m:[0m[38;2;248;248;242m lists with single definition[0m
+
+[38;2;248;248;242m;[0m[38;2;248;248;242m Description[0m
+[38;2;248;248;242m:[0m[38;2;248;248;242m lists[0m
+[38;2;248;248;242m:[0m[38;2;248;248;242m with more[0m
+[38;2;248;248;242m:[0m[38;2;248;248;242m definitions[0m
+
+[38;2;253;151;31m==[0m[38;2;253;151;31m Text formatting [0m[38;2;253;151;31m==[0m
+[38;2;248;248;242m''[0m[3;38;2;228;46;112mitalic text[0m[38;2;248;248;242m''[0m
+
+[38;2;248;248;242m'''[0m[1;38;2;249;38;114mbold text[0m[38;2;248;248;242m'''[0m
+
+[38;2;248;248;242m'''[0m[1;38;2;249;38;114m''[0m[3;38;2;228;46;112mbold italic text[0m[1;38;2;249;38;114m''[0m[38;2;248;248;242m'''[0m
+
+[38;2;253;151;31m==[0m[38;2;253;151;31m Links [0m[38;2;253;151;31m==[0m
+[38;2;248;248;242m[[0m[4;38;2;166;226;46mhttps://www.wikipedia.org/[0m[38;2;248;248;242m [0m[38;2;230;219;116mWikipedia[0m[38;2;248;248;242m][0m
+
+[38;2;253;151;31m==[0m[38;2;253;151;31m Images [0m[38;2;253;151;31m==[0m
+[38;2;248;248;242m[[[0m[38;2;190;132;255mFile[0m[38;2;255;255;255m:[0m[38;2;190;132;255mMediaWiki-2020-logo.svg[0m[38;2;255;255;255m|[0m[38;2;249;38;114mthumb[0m[38;2;255;255;255m|[0m[38;2;230;219;116mMediaWiki logo[0m[38;2;248;248;242m]][0m
diff --git a/tests/syntax-tests/source/MediaWiki/test.mediawiki b/tests/syntax-tests/source/MediaWiki/test.mediawiki
new file mode 100644
index 0000000000..54875b7c9a
--- /dev/null
+++ b/tests/syntax-tests/source/MediaWiki/test.mediawiki
@@ -0,0 +1,37 @@
+= Heading 1 =
+== Heading 2 ==
+=== Heading 3 ===
+==== Heading 4 ====
+===== Heading 5 =====
+====== Heading 6 ======
+
+== Lists ==
+* Unordered
+* lists
+** with nested
+*** elements
+
+# Ordered
+# lists
+## with nested
+### elements
+
+; Description : lists with single definition
+
+; Description
+: lists
+: with more
+: definitions
+
+== Text formatting ==
+''italic text''
+
+'''bold text'''
+
+'''''bold italic text'''''
+
+== Links ==
+[https://www.wikipedia.org/ Wikipedia]
+
+== Images ==
+[[File:MediaWiki-2020-logo.svg|thumb|MediaWiki logo]]