Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MediaWiki syntax #1926

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 13 additions & 0 deletions assets/patches/MediaWiki.sublime-syntax.patch
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions assets/syntaxes/02_Extra/MediaWiki
Submodule MediaWiki added at 843a48
37 changes: 37 additions & 0 deletions tests/syntax-tests/highlighted/MediaWiki/test.mediawiki
Original file line number Diff line number Diff line change
@@ -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]]
37 changes: 37 additions & 0 deletions tests/syntax-tests/source/MediaWiki/test.mediawiki
Original file line number Diff line number Diff line change
@@ -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]]