Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

added syntax highlighting for asciidoc #151

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions misc/syntax/Syntax.in
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,17 @@ include r.syntax
file ..\*\\.(?i:md)$ Markdown
include markdown.syntax

file ..\*\\.(?i:adoc)$ ASCIIDoc
include asciidoc.syntax

file ..\*\\.proto$ Protobuf\sFile
include protobuf.syntax

file ..\*\\.(?i:yab)$ Yabasic\s(Yet\sAnother\sBASIC)
include markdown.syntax

file ..\*\\.(?i:cbl|cob)$ Cobol\sProgram
include cobol.syntax

file .\* unknown
include unknown.syntax
55 changes: 55 additions & 0 deletions misc/syntax/asciidoc.syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# asciidoc syntax highlighting

context default lightgray
keyword whole linestart '*' white black
spellcheck

context linestart _Note_: \n\n green
spellcheck

context linestart ==== \n cyan
spellcheck

context linestart === \n yellow
spellcheck

context linestart == \n green
spellcheck

context linestart = \n red
spellcheck

context linestart \s \n\n black white
spellcheck

context //// //// brown
spellcheck

context [[ ]] red
spellcheck

context [ ] green
spellcheck

#context \s__ __ lightgray

context \s_ _ brown

context \s\*_ _\* green

#context **__ __** lightgray

# the following context results in a yellow space + a yellow * but not further
# to the next *. see line 362 in README.adoc
# the space is needed, to avoid highlighting all the file beginning to the *
# on line 399.
context \s\* \* yellow

#context ** ** lightgray

#context ``**__ __**`` lightgray

context `\*_ _\*` red

context ` ` cyan

Loading