mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-23 05:58:56 +01:00
Add MediaWiki syntax
This commit is contained in:
parent
d6ed5e6746
commit
619cf6e6d6
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -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
|
||||
|
@ -34,6 +34,7 @@
|
||||
- Added support for `slim` syntax, see #1693 (@mfinelli)
|
||||
- Racket, see #1884 (@jubnzv)
|
||||
- LiveScript, see #1915 (@Enselic)
|
||||
- MediaWiki, see #1925 (@sorairolake)
|
||||
|
||||
## New themes
|
||||
|
||||
|
13
assets/patches/MediaWiki.sublime-syntax.patch
vendored
Normal file
13
assets/patches/MediaWiki.sublime-syntax.patch
vendored
Normal file
@ -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
|
||||
|
1
assets/syntaxes/02_Extra/MediaWiki
vendored
Submodule
1
assets/syntaxes/02_Extra/MediaWiki
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 843a483e8b9f18c4ba914f29a788db5b3a87ed11
|
37
tests/syntax-tests/highlighted/MediaWiki/test.mediawiki
vendored
Normal file
37
tests/syntax-tests/highlighted/MediaWiki/test.mediawiki
vendored
Normal file
@ -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
|
37
tests/syntax-tests/source/MediaWiki/test.mediawiki
vendored
Normal file
37
tests/syntax-tests/source/MediaWiki/test.mediawiki
vendored
Normal file
@ -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]]
|
Loading…
Reference in New Issue
Block a user