├── Commands
├── Preview Document (Asciidoctor).tmCommand
├── Preview Document Book (Asciidoctor).tmCommand
├── Preview Document Book.tmCommand
└── Preview Document.tmCommand
├── Preferences
├── Comment Slashed Wrap Indent.tmPreferences
├── Folding.tmPreferences
├── Style: Test.tmPreferences
├── TOC: Heading.tmPreferences
├── TOC: SectionTemplate.tmPreferences
├── Typing Pairs Defaults.tmPreferences
└── Typing Pairs Literal.tmPreferences
├── README.md
├── Snippets
├── Bold.tmSnippet
├── Code.tmSnippet
├── Comment.tmSnippet
├── Example.tmSnippet
├── Image.tmSnippet
├── Italic.tmSnippet
├── Link.tmSnippet
├── Literal Block.tmSnippet
├── Literal No Passthru.tmSnippet
├── Literal.tmSnippet
├── Passthrough.tmSnippet
├── Quote.tmSnippet
├── Quoted.tmSnippet
├── See (Asciidoctor).tmSnippet
├── See Also (Asciidoctor).tmSnippet
├── See Also.tmSnippet
├── See.tmSnippet
├── Sidebar.tmSnippet
├── Start (Asciidoctor).tmSnippet
└── Start.tmSnippet
├── Syntaxes
└── asciidoc.tmLanguage
├── info.plist
└── testing.asciidoc
/Commands/Preview Document (Asciidoctor).tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | saveActiveFile
7 | command
8 | #!/usr/bin/env ruby
9 |
10 | require 'fileutils'
11 |
12 | f = ENV['TM_FILEPATH']
13 | fdir = File.dirname(f)
14 | fbase = File.basename(f, File.extname(f))
15 | f2 = ENV['HOME'] + '/Desktop/asciidocOutput/'
16 | FileUtils.mkdir(f2) unless File.exist?(f2)
17 | f2 = f2 + fbase + '.html'
18 |
19 |
20 | # this is what we would want to say in ruby; note that unsafe is necessary
21 | #
22 | # require 'asciidoctor'
23 | #
24 | # Asciidoctor.render_file(f, {:header_footer => true, :safe => 'unsafe', :to_file => f2})
25 |
26 | # however, TextMate gives us nice output if we pass through the command-line
27 | # and in that case unsafe is the default and so is header_footer
28 |
29 | # up to you to have correct asciidoctor in your TextMate PATH (puts ENV["PATH"] to see it)
30 | # for example mine is in ~/.rbenv/shims
31 | # yours might be in /usr/local/bin or in asciidoctor/bin folder somewhere
32 | ad = 'asciidoctor'
33 | s = %{#{ad} --verbose -a data-uri -a stylesheet=myasciidoctor.css -o "#{f2}" }
34 | s = s + %{"#{f}"}
35 |
36 | require 'shellwords'
37 | a = s.shellsplit
38 | require "#{ENV['TM_SUPPORT_PATH']}/lib/tm/executor"
39 | TextMate::Executor.run(*a, :use_hashbang => false, :verb => "Converting")
40 |
41 | # and show it in the browser
42 | `open "#{f2}"`
43 |
44 |
45 | input
46 | document
47 | inputFormat
48 | text
49 | keyEquivalent
50 | ^H
51 | name
52 | Preview Document (Asciidoctor)
53 | outputCaret
54 | afterOutput
55 | outputFormat
56 | html
57 | outputLocation
58 | newWindow
59 | scope
60 | text.asciidoc
61 | uuid
62 | 3A399F0A-5789-40D6-BE68-2A3A2775416C
63 | version
64 | 2
65 |
66 |
67 |
--------------------------------------------------------------------------------
/Commands/Preview Document Book (Asciidoctor).tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | saveModifiedFiles
7 | command
8 | #!/usr/bin/env ruby
9 |
10 | require 'fileutils'
11 |
12 | f = ENV['TM_FILEPATH']
13 | fdir = File.dirname(f)
14 | fbase = File.basename(f, File.extname(f))
15 | f2 = ENV['HOME'] + '/Desktop/asciidocOutput/'
16 | FileUtils.mkdir(f2) unless File.exist?(f2)
17 | f2 = f2 + fbase + '.html'
18 |
19 | # exactly the same as Preview Document (Asciidoctor) except for -dbook specification
20 |
21 | # this is what we would want to say in ruby; note that unsafe is necessary
22 | #
23 | # require 'asciidoctor'
24 | #
25 | # Asciidoctor.render_file(f, {:header_footer => true, :safe => 'unsafe', :to_file => f2})
26 |
27 | # however, TextMate gives us nice output if we pass through the command-line
28 | # and in that case unsafe is the default and so is header_footer
29 |
30 | ad = 'asciidoctor'
31 | s = %{#{ad} --verbose -dbook -a data-uri -a stylesheet=myasciidoctor.css -o "#{f2}" }
32 | s = s + %{"#{f}"}
33 |
34 | require 'shellwords'
35 | a = s.shellsplit
36 | require "#{ENV['TM_SUPPORT_PATH']}/lib/tm/executor"
37 | TextMate::Executor.run(*a, :use_hashbang => false, :verb => "Converting")
38 |
39 | # and show it in the browser
40 | `open "#{f2}"`
41 |
42 | input
43 | document
44 | inputFormat
45 | text
46 | keyEquivalent
47 | ^H
48 | name
49 | Preview Document Book (Asciidoctor)
50 | outputCaret
51 | afterOutput
52 | outputFormat
53 | html
54 | outputLocation
55 | newWindow
56 | scope
57 | text.asciidoc
58 | uuid
59 | DD26D323-6D59-4936-8247-FE306942B782
60 | version
61 | 2
62 |
63 |
64 |
--------------------------------------------------------------------------------
/Commands/Preview Document Book.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | saveModifiedFiles
7 | command
8 | #!/usr/bin/env ruby
9 |
10 | require 'fileutils'
11 |
12 | f = ENV['TM_FILEPATH']
13 | fdir = File.dirname(f)
14 | fbase = File.basename(f, File.extname(f))
15 | f2 = ENV['HOME'] + '/Desktop/asciidocOutput/'
16 | FileUtils.mkdir(f2) unless File.exist?(f2)
17 | f2 = f2 + fbase + '.html'
18 | ad = '/usr/local/bin/asciidoc'
19 | # blap - let's use cutting edge instead
20 | # ad = ENV['HOME'] + '/asciidocCuttingEdge/asciidoc/asciidoc.py'
21 | s = %{#{ad} --verbose -d book -a stylesheet=stylesheets/extra.css -a quirks! -a data-uri -o "#{f2}" }
22 | s = s + %{"#{f}"}
23 |
24 | =begin
25 | puts "<pre>"
26 | puts "Converting #{f}..."
27 | require 'open3'
28 | Open3.popen2e(s) do |i,o,t|
29 | o.sync = true
30 | while o.gets # not helping, might as well just o.read
31 | puts $_
32 | end
33 | end
34 | puts "</pre>"
35 | =end
36 |
37 | require 'shellwords'
38 | a = s.shellsplit
39 | require "#{ENV['TM_SUPPORT_PATH']}/lib/tm/executor"
40 | TextMate::Executor.run(*a, :use_hashbang => false, :verb => "Converting")
41 |
42 | `open "#{f2}"`
43 |
44 | input
45 | document
46 | inputFormat
47 | text
48 | keyEquivalent
49 | ^H
50 | name
51 | Preview Document Book
52 | outputCaret
53 | afterOutput
54 | outputFormat
55 | html
56 | outputLocation
57 | newWindow
58 | scope
59 | text.asciidoc
60 | uuid
61 | A3B1C275-6646-471E-B032-FAEFEEF68FC8
62 | version
63 | 2
64 |
65 |
66 |
--------------------------------------------------------------------------------
/Commands/Preview Document.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | autoScrollOutput
6 |
7 | beforeRunningCommand
8 | saveActiveFile
9 | command
10 | #!/usr/bin/env ruby
11 |
12 | require 'fileutils'
13 |
14 | f = ENV['TM_FILEPATH']
15 | fdir = File.dirname(f)
16 | fbase = File.basename(f, File.extname(f))
17 | f2 = ENV['HOME'] + '/Desktop/asciidocOutput/'
18 | FileUtils.mkdir(f2) unless File.exist?(f2)
19 | f2 = f2 + fbase + '.html'
20 | ad = '/usr/local/bin/asciidoc'
21 | # blap - let's use cutting edge instead
22 | # ad = ENV['HOME'] + '/asciidocCuttingEdge/asciidoc/asciidoc.py'
23 | s = %{#{ad} --verbose -a stylesheet=stylesheets/extra.css -a quirks! -a data-uri -o "#{f2}" }
24 | s = s + %{"#{f}"}
25 |
26 | =begin
27 | puts "<pre>"
28 | puts "Converting #{f}..."
29 | require 'open3'
30 | Open3.popen2e(s) do |i,o,t|
31 | o.sync = true
32 | while o.gets # not helping, might as well just o.read
33 | puts $_
34 | end
35 | end
36 | puts "</pre>"
37 | =end
38 |
39 | require 'shellwords'
40 | a = s.shellsplit
41 | require "#{ENV['TM_SUPPORT_PATH']}/lib/tm/executor"
42 | TextMate::Executor.run(*a, :use_hashbang => false, :verb => "Converting")
43 |
44 | `open "#{f2}"`
45 |
46 | input
47 | document
48 | inputFormat
49 | text
50 | keyEquivalent
51 | ^H
52 | name
53 | Preview Document
54 | outputCaret
55 | afterOutput
56 | outputFormat
57 | html
58 | outputLocation
59 | newWindow
60 | scope
61 | text.asciidoc
62 | uuid
63 | 7D5F0932-997C-4C74-9319-95A26BA645EF
64 | version
65 | 2
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Preferences/Comment Slashed Wrap Indent.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Comment Slashed Wrap Indent
7 | scope
8 | comment.line.double-slash.asciidoc
9 | settings
10 |
11 | indentedSoftWrap
12 |
13 | softWrap
14 |
15 |
16 | uuid
17 | 47ABC7FF-04FD-4D04-90C4-967C8DCA39E6
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Preferences/Folding.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Folding
7 | scope
8 | text.asciidoc
9 | settings
10 |
11 | foldingIndentedBlockIgnore
12 | ^(?!=+\s+\w)
13 | foldingIndentedBlockStart
14 | ^=+\s+\w
15 | foldingStartMarker
16 | ^(/|\*){5}
17 | foldingStopMarker
18 | ^(/|\*){4}
19 |
20 | uuid
21 | FB4E6BC6-BF3D-4D0E-9B6C-8DC461F9C524
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Preferences/Style: Test.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Style: Test
7 | scope
8 | punctuation.test
9 | settings
10 |
11 | background
12 | #FF0000
13 |
14 | uuid
15 | 415156AA-4669-4EB5-A97B-E29698A4B626
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Preferences/TOC: Heading.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | TOC: Heading
7 | scope
8 | text.asciidoc markup.heading.level
9 | settings
10 |
11 | showInSymbolList
12 | 1
13 | symbolTransformation
14 |
15 | s/(?<==)=/ /g; # change all but first # to m-space
16 | s/^=( *)\s+(.*)/$1$2/; # strip first # and space before title
17 |
18 |
19 | uuid
20 | 2549F30A-32A2-4A1A-8716-27B6BE1A18E0
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Preferences/TOC: SectionTemplate.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | TOC: SectionTemplate
7 | scope
8 | meta.tag.sectiontemplate.asciidoc
9 | settings
10 |
11 | showInSymbolList
12 | 1
13 |
14 | uuid
15 | CD854D82-52F2-45A0-AC34-F00F7563EAEB
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Preferences/Typing Pairs Defaults.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Typing Pairs Defaults
7 | scope
8 | text.asciidoc
9 | settings
10 |
11 | highlightPairs
12 |
13 |
14 | (
15 | )
16 |
17 |
18 | {
19 | }
20 |
21 |
22 | [
23 | ]
24 |
25 |
26 | “
27 | ”
28 |
29 |
30 | ‘
31 | ’
32 |
33 |
34 | +
35 | +
36 |
37 |
38 | smartTypingPairs
39 |
40 |
41 | "
42 | "
43 |
44 |
45 | (
46 | )
47 |
48 |
49 | {
50 | }
51 |
52 |
53 | [
54 | ]
55 |
56 |
57 | “
58 | ”
59 |
60 |
61 | ‘
62 | ’
63 |
64 |
65 | `
66 | `
67 |
68 |
69 | _
70 | _
71 |
72 |
73 | <
74 | >
75 |
76 |
77 | +
78 | +
79 |
80 |
81 | *
82 | *
83 |
84 |
85 |
86 | uuid
87 | 07C9999C-5DD1-4A2A-84BE-16A18EE547E4
88 |
89 |
90 |
--------------------------------------------------------------------------------
/Preferences/Typing Pairs Literal.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Typing Pairs Literal
7 | scope
8 | text.asciidoc source, text.asciidoc string.literal, text.asciidoc string.other.literal
9 | settings
10 |
11 | smartTypingPairs
12 |
13 |
14 | "
15 | "
16 |
17 |
18 | (
19 | )
20 |
21 |
22 | {
23 | }
24 |
25 |
26 | [
27 | ]
28 |
29 |
30 | “
31 | ”
32 |
33 |
34 | ‘
35 | ’
36 |
37 |
38 |
39 | uuid
40 | 0C447C02-762E-412A-981C-C2F356F0C5AD
41 |
42 |
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # A New AsciiDoc Bundle for TextMate 2
2 |
3 | ## Ground of Being
4 |
5 | The purpose of this bundle is to provide a working milieu for editing [AsciiDoc](http://asciidoc.org) in [TextMate 2](https://github.com/textmate/textmate).
6 |
7 | Previously, I was using the [Zuckschwerdt AsciiDoc bundle](https://github.com/zuckschwerdt/asciidoc.tmbundle) for TextMate; with a few changes to add missing features and to make it less crashy, it has served me fairly well under TextMate 1, through thousands of pages and four editions of my books (currently [iOS 7 Programming Fundamentals](http://shop.oreilly.com/product/0636920032465.do) and [Programming iOS 7](http://shop.oreilly.com/product/0636920031017.do)). It had some quirks and shortcomings, but I could live with them.
8 |
9 | Then, however, Mac OS X 10.9 ("Mavericks") arrived. This caused my Ruby-based TextMate projects (such as [RubyFrontier](https://github.com/mattneub/RubyFrontier)) to behave badly, until I also adopted TextMate 2. At that point, the old AsciiDoc bundle began to behave _very_ badly, and I decided to write my own. This is the result: a new AsciiDoc bundle, written from scratch, in which I can maintain and write my books.
10 |
11 | ## Problems, Solutions, and Philosophy
12 |
13 | An advantage of writing the grammar entirely from scratch is that I was able to make a completely fresh start. Many of the problems with the previous AsciiDoc bundle were caused by incorrect assumptions, mostly having to do with the fact that it was based on the Markdown bundle, which was a huge mistake, as AsciiDoc is not particularly like Markdown and is certainly not related to it. For example, the previous Asciidoc bundle's grammar, copying the Markdown bundle, was scoped as `text.html.asciidoc`; this caused all kinds of havoc, because it allowed the HTML TextMate bundle to reach into the AsciiDoc bundle and affect such things as styling and indentation in a particularly horrible way. But this was quite unnecessary, because although Markdown may be said in some weird way to be based on HTML, AsciiDoc most certainly is not.
14 |
15 | In order to write the "grammar" for this bundle from scratch, I have had to grapple with learning about TextMate grammars. This, in turn, has brought me smack dab into a major limitation of TextMate grammars: they are limited to parsing in a single pass, one line (paragraph) at a time.
16 |
17 | That limitation means that TextMate is not at all suited to a markup "language" such as AsciiDoc. My solution is not to attempt in any way to push the limits; on the contrary, my philosophy is that the only sensible way to "solve" the problem is to content myself with doing what TextMate comfortably _can_ do, even if this means omitting aspects of AsciiDoc. For example:
18 |
19 | * AsciiDoc can do "setext"-style headers, a line of some number of text characters, followed by a line of the same number of delimiter characters. But TextMate can't "see" a two-line combination of this sort; it sees only one line at a time, and cannot peek ahead. Thus, while TextMate can (sort of) "see" the line of delimiter characters, there is no way TextMate can know that a line of text is the line _preceding_ the line of delimiter characters — so it can't style that text, or fold on it, or include it in the document's "table of contents".
20 |
21 | My solution is to give up. I mark up the line of delimiter characters, but I ignore the line of text. I can do styling, folding, and "table of contents" on the _other_ style of heading (where you start the line with one or more equals signs), so if you want those features, use that style, not the "setext" style.
22 |
23 | * Similarly, a list block in AsciiDoc is a complex thing, involving AsciiDoc's flexible notion of a paragraph (it can include newline characters) as well as an awareness of what kind of paragraph comes before and after. TextMate can't grapple with any of that. So I don't even try. I can pick out pretty reliably the characters that signal the _start_ of an individual list paragraph, so I mark them — and that's all.
24 |
25 | ## Details
26 |
27 | I have tried to make the "grammar" (which visibly styles the syntactically significant pieces of the text) reasonably complete; I have certainly brought it to the point where it marks up my own book chapters very well indeed. But, as I've just explained, I can't make TextMate parse the document the way AsciiDoc does. Therefore, to use this bundle, you have to know some special rules and differences that distinguish my limited version of AsciiDoc from real AsciiDoc.
28 |
29 | * As I explained in the previous section, you should **avoid setext headers**: use `#`-headers instead. Moreover, AsciiDoc has various styles of `#`-header, but I support only the style where the line _starts_ with `#`. If you use this style, you get nice markup, section folding, and a hierarchical table of contents.
30 |
31 | * My **table of contents** includes only two kinds of thing: `#`-style headers, and "known" section templates such `appendix` and `index`. Such section templates must be _explicit_; I do not parse header text to deduce the section type the way AsciiDoc does.
32 |
33 | * TextMate can't see across line boundaries. This is a severe problem, because an AsciiDoc paragraph can consist of multiple lines. In order to keep things simple, fast, and coherent, therefore, all **inline markup** such as quotes _must be confined to a single line_ (i.e. no explicit linefeed in the middle) if you want them marked up. Thus:
34 |
35 | This will be *bold*.
36 | And this will be _italic_.
37 | But this will be _neither *bold
38 | nor* italic_ even though in AsciiDoc it is.
39 |
40 | This is not a severe limitation, and the result is _way_ better than the previous AsciiDoc bundle, which fell into all kinds of incoherencies over this sort of thing.
41 |
42 | * **Single-quoted strings** (single backtick on the left, single apostrophe on the right) are _not coded for at all_. You can use them, of course, but I don't mark them up. AsciiDoc itself is already incoherent in this regard, especially when single-quoted and double-quoted strings appear in the same paragraph, and it just isn't a complication I want to get into. In my own writing, I explicitly surround single-quoted strings with curly quotes (‘like this’), and these are a smart typing pair, so it shouldn't be a big deal.
43 |
44 | * **Comment blocks** can be folded, but only if you follow this very specific rule: the opening delimiter is a line consisting of exactly five slashes (`/`), and the closing delimiter is a line consisting of exactly four slashes and a space. The reason is that TextMate can't do folding unless the opening and closing delimiters _differ_, so I have had to make up an artificial difference. (Naturally, if you use the included snippet, `com[TAB]`, that is what I give you.)
45 |
46 | * **Sidebar blocks** work like comment blocks (see previous paragraph): they can be folded, if the opening delimiter is exactly five asterisks (`*`) and the closing delimiter is exactly four asterisks and a space. (Naturally, if you use the included snippet, `side[TAB]`, that is what I give you.)
47 |
48 | * An **example block** delimiter can only have four or five equal signs (`=`), because otherwise TextMate can't distinguish it from a level 0 setext header delimiter (which is assumed to be longer). (Naturally, if you use the included snippet, `ex[TAB]`, that is what I give you.)
49 |
50 | * Similarly, a **passthrough block** delimiter can only have four or five plus signs (`+`), because otherwise TextMate can't distinguish it from a level 4 setext header delimiter (which is assumed to be longer). (Naturally, if you use the included snippet, `pass[TAB]`, that is what I give you.)
51 |
52 | * Similarly, a **code (listing) block** delimiter can only have four or five hyphens (`-`), because otherwise TextMate can't distinguish it from a level 1 setext header delimiter (which is assumed to be longer). (Naturally, if you use the included snippet, `code[TAB]`, that is what I give you.)
53 |
54 | (By the way, a listing block is assumed to contain source code, but no assumption is made about language so you won't see any syntax coloring.)
55 |
56 | * **Bulleted and numbered paragraphs** are picked out solely on the basis of the fact that they start with a bullet or number (in the various manifestations that AsciiDoc permits), and that bullet or number is the only thing about them that I mark up. This means you can get a false positive if you start right after a hard wrap with a bullet or number appropriately formatted. This does no harm and is easily avoided.
57 |
58 | * **Macros** are notated only if you use the form of notation containing a colon (or two colons) and ending in square brackets.
59 |
60 | * **Passthrough** blocks, `pass:` macros, and `+++` and `$$` delimited passthrough are assumed to contain XML (i.e. the XML grammar is injected at this point). In my usage this is always true, so it is a reasonable assumption, and it shouldn't get badly in the way in other cases.
61 |
62 | * I have not coded at all for **tables**.
63 |
64 | ## Current Usage and Future Directions
65 |
66 | I wrote this bundle because I wanted a working AsciiDoc bundle in order to continue using TextMate 2 and AsciiDoc under Mavericks as my writing tool. The result is something that works for me. In my opinion this AsciiDoc TextMate bundle is better than any other that I've seen. I am able to write in an agile fashion, and the text is marked up in a way that looks clean and informative under the Theme that I particularly favor (Mac Classic).
67 |
68 | Nonetheless, there may be areas in which I have fallen short just because I'm not conscious of them. For example, I have probably not done a sufficiently complete list of includes for my sidebar block, because I stopped after I had included everything I actually use in sidebars. If you have suggestions, feel free to let me know. If you are the kind of person who can grapple with the nitty-gritty of TextMate grammars, feel free to fork and/or to submit a pull request.
69 |
70 | Matt Neuburg,
--------------------------------------------------------------------------------
/Snippets/Bold.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | *${1:$TM_SELECTED_TEXT}*
7 | disableAutoIndent
8 |
9 | keyEquivalent
10 | @b
11 | name
12 | Bold
13 | scope
14 | text.asciidoc
15 | uuid
16 | 43C59A8A-8922-4E52-A93E-0416022A5F48
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/Code.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | ----
8 | $1
9 | ----
10 | $0
11 |
12 | disableAutoIndent
13 |
14 | name
15 | Code
16 | scope
17 | text.asciidoc
18 | tabTrigger
19 | code
20 | uuid
21 | 3113A96B-0D44-4073-90BC-69F81ACF6B8E
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Snippets/Comment.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | /////
8 | $1
9 | ////
10 | $0
11 |
12 | disableAutoIndent
13 |
14 | name
15 | Comment
16 | scope
17 | text.asciidoc
18 | tabTrigger
19 | com
20 | uuid
21 | 73A58AA7-17DE-4D7C-8809-CF1E060D475F
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Snippets/Example.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | .${1:Title}
8 | ====
9 | $2
10 | ====
11 | $0
12 |
13 | disableAutoIndent
14 |
15 | name
16 | Example
17 | scope
18 | text.asciidoc
19 | tabTrigger
20 | ex
21 | uuid
22 | C3D609A5-368D-48BD-ACF6-918F136CC209
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Snippets/Image.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | [[${1:xref}]]
8 | .${2:Title}
9 | image::${3:path/to/image}[]
10 | $0
11 |
12 | name
13 | Image
14 | scope
15 | text.asciidoc
16 | tabTrigger
17 | im
18 | uuid
19 | FFB3AF0D-DF61-4FC4-90C8-EE216033B5B8
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Snippets/Italic.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | _${1:$TM_SELECTED_TEXT}_
7 | disableAutoIndent
8 |
9 | keyEquivalent
10 | @i
11 | name
12 | Italic
13 | scope
14 | text.asciidoc
15 | uuid
16 | ABC8688A-89E0-4FEB-9490-9EF49A69DC3D
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/Link.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | pass:[<a href="${1:$TM_SELECTED_TEXT}" class="orm:hideurl"><em class="hyperlink">$1</em></a>]
7 | disableAutoIndent
8 |
9 | keyEquivalent
10 | @l
11 | name
12 | Link
13 | scope
14 | text.asciidoc
15 | uuid
16 | 7B0C8161-E3D8-4F88-814D-A605CE1A3C27
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/Literal Block.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | ....
8 | $1
9 | ....
10 | $0
11 |
12 | disableAutoIndent
13 |
14 | name
15 | Literal Block
16 | scope
17 | text.asciidoc
18 | tabTrigger
19 | lit
20 | uuid
21 | 7FF26494-8C20-4665-9213-0957645859A0
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Snippets/Literal No Passthru.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | \`${1:$TM_SELECTED_TEXT}\`
7 | disableAutoIndent
8 |
9 | keyEquivalent
10 | ^~@'
11 | name
12 | Literal No Passthru
13 | scope
14 | text.asciidoc
15 | uuid
16 | DCE8ADEC-5021-4AE0-8E08-F0350C2E3189
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/Literal.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | +${1:$TM_SELECTED_TEXT}+
7 | disableAutoIndent
8 |
9 | keyEquivalent
10 | ^~@=
11 | name
12 | Literal
13 | scope
14 | text.asciidoc
15 | uuid
16 | 24F2B564-B995-45F4-892C-64D228492DAA
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/Passthrough.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | ++++
8 | $1
9 | ++++
10 | $0
11 |
12 | disableAutoIndent
13 |
14 | name
15 | Passthrough
16 | scope
17 | text.asciidoc
18 | tabTrigger
19 | pass
20 | uuid
21 | 7D57542C-56C5-44BE-8D53-F52FD62DD5EA
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Snippets/Quote.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | ____
8 | $1
9 | ____
10 | $0
11 |
12 | disableAutoIndent
13 |
14 | name
15 | Quote
16 | scope
17 | text.asciidoc
18 | tabTrigger
19 | quote
20 | uuid
21 | FB687DFA-647D-45EE-B3BF-9AE8EABB55D7
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Snippets/Quoted.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | \`\`${1:$TM_SELECTED_TEXT}''
7 | disableAutoIndent
8 |
9 | keyEquivalent
10 | @'
11 | name
12 | Quoted
13 | scope
14 | text.asciidoc
15 | uuid
16 | 944A21B8-C8B1-4A72-AA09-65D89F871259
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/See (Asciidoctor).tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | pass:none[<a data-type="indexterm" data-primary="$1" data-see="$2"></a>]
7 |
8 | disableAutoIndent
9 |
10 | name
11 | See (Asciidoctor)
12 | scope
13 | text.asciidoc
14 | tabTrigger
15 | see
16 | uuid
17 | 114300D2-9830-4B8A-B18E-260FC813F817
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Snippets/See Also (Asciidoctor).tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | pass:none[<a data-type="indexterm" data-primary="$1" data-seealso="$2"></a>]
7 |
8 | disableAutoIndent
9 |
10 | name
11 | See Also (Asciidoctor)
12 | scope
13 | text.asciidoc
14 | tabTrigger
15 | see
16 | uuid
17 | 326FDFD1-4181-4279-887D-9B2DADD71AA8
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Snippets/See Also.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ifdef::basebackend-docbook[]
7 | pass:none[<indexterm><primary>$1</primary><seealso>$2</seealso></indexterm>]
8 | endif::basebackend-docbook[]
9 |
10 | disableAutoIndent
11 |
12 | name
13 | See Also
14 | scope
15 | text.asciidoc
16 | tabTrigger
17 | see
18 | uuid
19 | 4366495F-77A2-4E9B-8966-85AA7185AF9A
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Snippets/See.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ifdef::basebackend-docbook[]
7 | pass:none[<indexterm><primary>$1</primary><see>$2</see></indexterm>]
8 | endif::basebackend-docbook[]
9 |
10 | disableAutoIndent
11 |
12 | name
13 | See
14 | scope
15 | text.asciidoc
16 | tabTrigger
17 | see
18 | uuid
19 | 5BC14415-F7BC-40B2-9014-C35C62B7FB08
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Snippets/Sidebar.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 |
7 | .${1:Title}
8 | *****
9 | $2
10 | ****
11 | $0
12 |
13 | name
14 | Sidebar
15 | scope
16 | text.asciidoc
17 | tabTrigger
18 | side
19 | uuid
20 | 559A32BB-F3D5-4BAA-BCE8-D1DC6444EDCB
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Snippets/Start (Asciidoctor).tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | pass:none[<a data-type="indexterm" id="$1" data-primary="$2"></a>]
7 | pass:none[<a data-type="indexterm" data-startref="$1"></a>]
8 |
9 | disableAutoIndent
10 |
11 | name
12 | Start (Asciidoctor)
13 | scope
14 | text.asciidoc
15 | tabTrigger
16 | start
17 | uuid
18 | F9EDAD38-E2E6-4D37-AADA-29554D4451F7
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Snippets/Start.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ifdef::basebackend-docbook[]
7 | pass:none[<indexterm id="$1" class='startofrange'><primary>$2</primary></indexterm>]
8 | endif::basebackend-docbook[]
9 | ifdef::basebackend-docbook[]
10 | pass:none[<indexterm startref="$1" class="endofrange" />]
11 | endif::basebackend-docbook[]
12 |
13 | disableAutoIndent
14 |
15 | name
16 | Start
17 | scope
18 | text.asciidoc
19 | tabTrigger
20 | start
21 | uuid
22 | 8B948AA5-1C9F-4083-B874-1B89A069F3DC
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Syntaxes/asciidoc.tmLanguage:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fileTypes
6 |
7 | asciidoc
8 |
9 | keyEquivalent
10 | ^~A
11 | name
12 | AsciiDoc
13 | patterns
14 |
15 |
16 | include
17 | #lists
18 |
19 |
20 | include
21 | #blocks
22 |
23 |
24 | include
25 | #titles
26 |
27 |
28 | include
29 | #lines
30 |
31 |
32 | include
33 | #inline
34 |
35 |
36 | include
37 | #characters
38 |
39 |
40 | repository
41 |
42 | blocks
43 |
44 | patterns
45 |
46 |
47 | include
48 | #literal_block_announced
49 |
50 |
51 | include
52 | #literal_block_delimited
53 |
54 |
55 | include
56 | #comment_block
57 |
58 |
59 | include
60 | #listing_block
61 |
62 |
63 | include
64 | #sidebar_block
65 |
66 |
67 | include
68 | #passthrough_block
69 |
70 |
71 | include
72 | #quote_block
73 |
74 |
75 | include
76 | #example_block
77 |
78 |
79 | include
80 | #open_block
81 |
82 |
83 | repository
84 |
85 | comment_block
86 |
87 | begin
88 | ^(/{4,})\s*$\n?
89 | beginCaptures
90 |
91 | 0
92 |
93 | name
94 | punctuation.definition.comment.begin.asciidoc
95 |
96 |
97 | comment
98 | comment block; note the big surprise that macros are enabled here
99 | contentName
100 | meta.block.comment.content.asciidoc
101 | end
102 | ^(/{4,})\s*$\n?
103 | endCaptures
104 |
105 | 0
106 |
107 | name
108 | punctuation.definition.comment.end.asciidoc
109 |
110 |
111 | name
112 | comment.block.asciidoc
113 | patterns
114 |
115 |
116 | include
117 | #macro
118 |
119 |
120 |
121 | example_block
122 |
123 | begin
124 | ^(={4,5})\s*$\n?
125 | beginCaptures
126 |
127 | 0
128 |
129 | name
130 | constant.delimiter.example.begin.asciidoc
131 |
132 |
133 | comment
134 | might need to add more includes but these are the ones that arise in practice for me; note restriction to 4 or 5 to distinguish from level 0 setext
135 | contentName
136 | meta.block.example.content.asciidoc
137 | end
138 | ^(={4,5})\s*$\n?
139 | endCaptures
140 |
141 | 0
142 |
143 | name
144 | constant.delimiter.example.end.asciidoc
145 |
146 |
147 | name
148 | string.unquoted.block.example.asciidoc
149 | patterns
150 |
151 |
152 | include
153 | #lists
154 |
155 |
156 | include
157 | #listing_block
158 |
159 |
160 | include
161 | #lines
162 |
163 |
164 | include
165 | #inline
166 |
167 |
168 | include
169 | #characters
170 |
171 |
172 |
173 | listing_block
174 |
175 | begin
176 | ^(\-{4,5})\s*$\n?
177 | beginCaptures
178 |
179 | 0
180 |
181 | name
182 | constant.delimiter.listing.begin.asciidoc
183 |
184 |
185 | comment
186 | declare content as source in order to get any extra yummy source goodness
187 | contentName
188 | source.block.listing.content.asciidoc
189 | end
190 | ^(\-{4,5})\s*$\n?
191 | endCaptures
192 |
193 | 0
194 |
195 | name
196 | constant.delimiter.listing.end.asciidoc
197 |
198 |
199 | name
200 | meta.embedded.block.listing.asciidoc
201 | patterns
202 |
203 |
204 | include
205 | #callout
206 |
207 |
208 |
209 | literal_block_announced
210 |
211 | begin
212 | ^((\[)"?literal\"?,?.*(\]))\s*$\n?
213 | beginCaptures
214 |
215 | 1
216 |
217 | name
218 | support.variable.attributelist.asciidoc
219 |
220 | 2
221 |
222 | name
223 | punctuation.definition.attributelistline.begin.asciidoc
224 |
225 | 3
226 |
227 | name
228 | punctuation.definition.attributelistline.end.asciidoc
229 |
230 |
231 | comment
232 | section template announced as literal, starts literal block
233 | contentName
234 | meta.block.literal.content.asciidoc
235 | end
236 | (?=^\s*$)
237 | name
238 | string.literal.block.announced.asciidoc
239 | patterns
240 |
241 |
242 | include
243 | #callout
244 |
245 |
246 |
247 | literal_block_delimited
248 |
249 | begin
250 | ^(\.{4,})\s*$\n?
251 | beginCaptures
252 |
253 | 0
254 |
255 | name
256 | constant.delimiter.block.literal.begin.asciidoc
257 |
258 |
259 | comment
260 | alternate way to get literal block, delimit with 4 or more periods
261 | contentName
262 | meta.block.literal.content.asciidoc
263 | end
264 | ^(\.{4,})\s*$\n?
265 | endCaptures
266 |
267 | 0
268 |
269 | name
270 | constant.delimiter.block.literal.end.asciidoc
271 |
272 |
273 | name
274 | string.literal.block.delimited.asciidoc
275 | patterns
276 |
277 |
278 | include
279 | #callout
280 |
281 |
282 |
283 | open_block
284 |
285 | begin
286 | ^(\-\-)\s*$\n?
287 | beginCaptures
288 |
289 | 0
290 |
291 | name
292 | constant.delimiter.block.open.begin.asciidoc
293 |
294 |
295 | comment
296 | might need to check on these includes
297 | contentName
298 | meta.block.open.content.asciidoc
299 | end
300 | ^(\-\-)\s*$\n?
301 | endCaptures
302 |
303 | 0
304 |
305 | name
306 | constant.delimiter.block.open.end.asciidoc
307 |
308 |
309 | name
310 | meta.block.open.asciidoc
311 | patterns
312 |
313 |
314 | include
315 | #lists
316 |
317 |
318 | include
319 | #comment_block
320 |
321 |
322 | include
323 | #listing_block
324 |
325 |
326 | include
327 | #passthrough_block
328 |
329 |
330 | include
331 | #lines
332 |
333 |
334 | include
335 | #inline
336 |
337 |
338 | include
339 | #characters
340 |
341 |
342 |
343 | passthrough_block
344 |
345 | begin
346 | ^(\+{4,5})\s*$\n?
347 | beginCaptures
348 |
349 | 0
350 |
351 | name
352 | constant.delimiter.block.passthrough.begin.asciidoc
353 |
354 |
355 | comment
356 | must be four or five to distinguish from level 4 setext
357 | contentName
358 | text.xml.block.passthrough.content.asciidoc
359 | end
360 | ^(\+{4,5})\s*$\n?
361 | endCaptures
362 |
363 | 0
364 |
365 | name
366 | constant.delimiter.block.passthrough.end.asciidoc
367 |
368 |
369 | name
370 | meta.embedded.block.passthrough.asciidoc
371 | patterns
372 |
373 |
374 | include
375 | text.xml
376 |
377 |
378 |
379 | quote_block
380 |
381 | begin
382 | ^(_{4,})\s*$\n?
383 | beginCaptures
384 |
385 | 0
386 |
387 | name
388 | constant.delimiter.block.quote.begin.asciidoc
389 |
390 |
391 | comment
392 | might need to add more includes, but these are the ones that arise for me in practice
393 | contentName
394 | meta.block.quote.content.asciidoc
395 | end
396 | ^(_{4,})\s*$\n?
397 | endCaptures
398 |
399 | 0
400 |
401 | name
402 | constant.delimiter.block.quote.end.asciidoc
403 |
404 |
405 | name
406 | markup.quote.block.asciidoc
407 | patterns
408 |
409 |
410 | include
411 | #lines
412 |
413 |
414 | include
415 | #inline
416 |
417 |
418 | include
419 | #characters
420 |
421 |
422 |
423 | sidebar_block
424 |
425 | begin
426 | ^(\*{4,})\s*$\n?
427 | beginCaptures
428 |
429 | 0
430 |
431 | name
432 | constant.delimiter.block.sidebar.begin.asciidoc
433 |
434 |
435 | comment
436 | might need to add more includes but these are the ones that arise in practice for me
437 | contentName
438 | meta.block.sidebar.content.asciidoc
439 | end
440 | ^(\*{4,})\s*$\n?
441 | endCaptures
442 |
443 | 0
444 |
445 | name
446 | constant.delimiter.block.sidebar.end.asciidoc
447 |
448 |
449 | name
450 | string.quoted.block.sidebar.asciidoc
451 | patterns
452 |
453 |
454 | include
455 | #lists
456 |
457 |
458 | include
459 | #comment_block
460 |
461 |
462 | include
463 | #listing_block
464 |
465 |
466 | include
467 | #lines
468 |
469 |
470 | include
471 | #inline
472 |
473 |
474 | include
475 | #characters
476 |
477 |
478 |
479 |
480 |
481 | callout
482 |
483 | captures
484 |
485 | 1
486 |
487 | name
488 | punctuation.definition.callout.begin.asciidoc
489 |
490 | 2
491 |
492 | name
493 | punctuation.definition.callout.end.asciidoc
494 |
495 |
496 | comment
497 | has to be alone in repository (not in a group), as it operates in only a couple of highly specific places
498 | match
499 | (?<!\\)(<)\d+(>)
500 | name
501 | constant.other.callout.asciidoc
502 |
503 | characters
504 |
505 | patterns
506 |
507 |
508 | include
509 | #entity
510 |
511 |
512 | include
513 | #xmlentity
514 |
515 |
516 | include
517 | #escape
518 |
519 |
520 | include
521 | #replacement
522 |
523 |
524 | include
525 | #passmacro
526 |
527 |
528 | include
529 | #macro
530 |
531 |
532 | include
533 | #xref
534 |
535 |
536 | include
537 | #biblio_anchor
538 |
539 |
540 | include
541 | #index3
542 |
543 |
544 | include
545 | #index2
546 |
547 |
548 | repository
549 |
550 | biblio_anchor
551 |
552 | captures
553 |
554 | 1
555 |
556 | name
557 | punctuation.definition.biblioanchor.begin.asciidoc
558 |
559 | 2
560 |
561 | name
562 | punctuation.definition.biblioanchor.end.asciidoc
563 |
564 |
565 | match
566 | (?<!\[)(\[\[\[).*?(\]\]\])(?!\])
567 | name
568 | storage.type.reference.biblioanchor.asciidoc
569 |
570 | entity
571 |
572 | comment
573 | ➊ ¶
574 | match
575 | (?<!\\)&#(x[0-9a-fA-f]{4}|[0-9]{3});
576 | name
577 | constant.character.entity.asciidoc
578 |
579 | escape
580 |
581 | comment
582 | I do not really know if this is a good list, adopted wholesale from original bundle
583 | match
584 | \\(?=[-`*_#+.!(){}\[\]\\>:])
585 | name
586 | constant.character.escape.asciidoc
587 |
588 | index2
589 |
590 | captures
591 |
592 | 1
593 |
594 | name
595 | constant.character.indexterm.double.begin.asciidoc
596 |
597 | 3
598 |
599 | name
600 | constant.character.indexterm.double.end.asciidoc
601 |
602 |
603 | match
604 | (?<!\()(\({2})([^\(\s].*?)(\){2})(?!\))
605 | name
606 | variable.other.indexterm.double.asciidoc
607 |
608 | index3
609 |
610 | captures
611 |
612 | 1
613 |
614 | name
615 | constant.character.indexterm.triple.begin.asciidoc
616 |
617 | 3
618 |
619 | name
620 | constant.character.indexterm.triple.end.asciidoc
621 |
622 |
623 | match
624 | (?<!\()(\({3})([^\(].*?)(\){3})(?!\))
625 | name
626 | variable.other.indexterm.triple.asciidoc
627 |
628 | macro
629 |
630 | captures
631 |
632 | 1
633 |
634 | name
635 | markup.underline.link.macro.asciidoc
636 |
637 | 3
638 |
639 | name
640 | keyword.control.name.macro.asciidoc
641 |
642 | 4
643 |
644 | name
645 | constant.character.separator.macro.asciidoc
646 |
647 | 5
648 |
649 | name
650 | markup.underline.target.macro.asciidoc
651 |
652 | 6
653 |
654 | name
655 | constant.character.attributes.macro.begin.asciidoc
656 |
657 | 7
658 |
659 | name
660 | variable.parameter.attributes.macro.asciidoc
661 |
662 | 8
663 |
664 | name
665 | constant.character.attributes.macro.end.asciidoc
666 |
667 |
668 | comment
669 | there are other macro notations but I match only those that end in square brackets
670 | match
671 | (?x)
672 | (?:
673 | ((?:https?|mailto|ftp|file) # specify separately so we can mark them as links that TextMate opens
674 | ?:{1} # inline only
675 | \S*) # (others such as image are partial URLs and/or TextMate cannot handle them)
676 | |
677 | (([a-zA-Z0-9][a-zA-Z0-9_]*)
678 | (:{1,2})
679 | (\S*))
680 | )
681 | (?:(\[)([^\]]*)(\]))
682 |
683 | name
684 | meta.macro.asciidoc
685 |
686 | passmacro
687 |
688 | captures
689 |
690 | 1
691 |
692 | name
693 | keyword.control.name.macro.pass.asciidoc
694 |
695 | 2
696 |
697 | name
698 | constant.character.separator.macro.asciidoc
699 |
700 | 3
701 |
702 | name
703 | markup.underline.target.macro.asciidoc
704 |
705 | 4
706 |
707 | name
708 | constant.character.attributes.macro.begin.asciidoc
709 |
710 | 5
711 |
712 | name
713 | variable.parameter.attributes.macro.pass.asciidoc
714 | patterns
715 |
716 |
717 | include
718 | text.xml
719 |
720 |
721 |
722 | 6
723 |
724 | name
725 | constant.character.attributes.macro.end.asciidoc
726 |
727 |
728 | match
729 | (?x)
730 | (pass)
731 | (:{1,2})
732 | (\S*)
733 | (\[)([^\]]*)(\])
734 |
735 | name
736 | meta.macro.pass.asciidoc
737 |
738 | replacement
739 |
740 | comment
741 | replace me, my sweet replaceable you...
742 | match
743 | (?x)
744 | (?<!\\) # unless I am preceded by an escape, that is...
745 | (
746 | \(C\)
747 | |
748 | \(TM\)
749 | |
750 | \(R\)
751 | |
752 | ((?<!\-)\-\-(?!\-)) # exactly two, and even this may not rule out all that I want to
753 | |
754 | ((?<!\.)\.\.\.(?!\.)) # exactly three
755 | |
756 | \->
757 | |
758 | <\-
759 | |
760 | =>
761 | |
762 | <=
763 | )
764 | name
765 | constant.character.replacement.asciidoc
766 |
767 | xmlentity
768 |
769 | comment
770 | amp, lt, gt
771 | match
772 | (?<!\\)&(amp|lt|gt);
773 | name
774 | constant.character.entity.xml.asciidoc
775 |
776 | xref
777 |
778 | captures
779 |
780 | 1
781 |
782 | name
783 | constant.character.xref.begin.asciidoc
784 |
785 | 2
786 |
787 | name
788 | markup.underline.term.xref.asciidoc
789 |
790 | 5
791 |
792 | name
793 | variable.parameter.xref.asciidoc
794 |
795 | 6
796 |
797 | name
798 | constant.character.xref.end.asciidoc
799 |
800 |
801 | match
802 | (?<!<)(<<)([^,]*?)((,\s*)(.*?))?(>>)(?!<)
803 | name
804 | meta.xref.asciidoc
805 |
806 |
807 |
808 | inline
809 |
810 | patterns
811 |
812 |
813 | include
814 | #passthru
815 |
816 |
817 | include
818 | #double_bold
819 |
820 |
821 | include
822 | #double_italic
823 |
824 |
825 | include
826 | #double_literal
827 |
828 |
829 | include
830 | #double_unquoted
831 |
832 |
833 | include
834 | #double_quote
835 |
836 |
837 | include
838 | #single_bold
839 |
840 |
841 | include
842 | #single_italic
843 |
844 |
845 | include
846 | #single_literal
847 |
848 |
849 | include
850 | #single_literal_nopassthru
851 |
852 |
853 | include
854 | #single_unquoted
855 |
856 |
857 | include
858 | #superscript
859 |
860 |
861 | include
862 | #subscript
863 |
864 |
865 | repository
866 |
867 | double_bold
868 |
869 | captures
870 |
871 | attlist
872 |
873 | name
874 | support.variable.attributelist.asciidoc
875 |
876 | closer
877 |
878 | name
879 | punctuation.definition.bold.double.end.asciidoc
880 |
881 | delim
882 |
883 | name
884 | punctuation.definition.bold.double.begin.asciidoc
885 |
886 | inner
887 |
888 | name
889 | meta.boldinner.double.asciidoc
890 | patterns
891 |
892 |
893 | include
894 | #double_italic
895 |
896 |
897 | include
898 | #double_literal
899 |
900 |
901 | include
902 | #double_unquoted
903 |
904 |
905 | include
906 | #double_quote
907 |
908 |
909 | include
910 | #single_italic
911 |
912 |
913 | include
914 | #single_literal
915 |
916 |
917 | include
918 | #single_literal_nopassthru
919 |
920 |
921 | include
922 | #single_unquoted
923 |
924 |
925 | include
926 | #superscript
927 |
928 |
929 | include
930 | #subscript
931 |
932 |
933 | include
934 | #characters
935 |
936 |
937 |
938 |
939 | match
940 | (?x)
941 | (?<attlist>\[[^\]]*?\])? # might start with an attribute list
942 | (?<!\\) # must not be preceded by escape
943 | (?<delim>\*\*)(?<inner>.*?)(?<closer>\k<delim>) # anything surrounded by double star
944 |
945 | name
946 | markup.bold.double.asciidoc
947 |
948 | double_italic
949 |
950 | captures
951 |
952 | attlist
953 |
954 | name
955 | support.variable.attributelist.asciidoc
956 |
957 | closer
958 |
959 | name
960 | punctuation.definition.italic.double.end.asciidoc
961 |
962 | delim
963 |
964 | name
965 | punctuation.definition.italic.double.begin.asciidoc
966 |
967 | inner
968 |
969 | name
970 | meta.italicinner.double.asciidoc
971 | patterns
972 |
973 |
974 | include
975 | #double_bold
976 |
977 |
978 | include
979 | #double_literal
980 |
981 |
982 | include
983 | #double_unquoted
984 |
985 |
986 | include
987 | #double_quote
988 |
989 |
990 | include
991 | #single_bold
992 |
993 |
994 | include
995 | #single_literal
996 |
997 |
998 | include
999 | #single_literal_nopassthru
1000 |
1001 |
1002 | include
1003 | #single_unquoted
1004 |
1005 |
1006 | include
1007 | #superscript
1008 |
1009 |
1010 | include
1011 | #subscript
1012 |
1013 |
1014 | include
1015 | #characters
1016 |
1017 |
1018 |
1019 |
1020 | match
1021 | (?x)
1022 | (?<attlist>\[[^\]]*?\])? # might start with attribute list
1023 | (?<!\\) # must not be preceded by escape
1024 | (?<delim>__)(?<inner>.*?)(?<closer>\k<delim>) # anything surrounded by double underline
1025 |
1026 | name
1027 | markup.italic.double.asciidoc
1028 |
1029 | double_literal
1030 |
1031 | captures
1032 |
1033 | attlist
1034 |
1035 | name
1036 | support.variable.attributelist.asciidoc
1037 |
1038 | closer
1039 |
1040 | name
1041 | punctuation.definition.literal.double.end.asciidoc
1042 |
1043 | delim
1044 |
1045 | name
1046 | punctuation.definition.literal.double.begin.asciidoc
1047 |
1048 | inner
1049 |
1050 | name
1051 | meta.literalinner.double.asciidoc
1052 | patterns
1053 |
1054 |
1055 | include
1056 | #double_bold
1057 |
1058 |
1059 | include
1060 | #double_italic
1061 |
1062 |
1063 | include
1064 | #double_unquoted
1065 |
1066 |
1067 | include
1068 | #double_quote
1069 |
1070 |
1071 | include
1072 | #single_bold
1073 |
1074 |
1075 | include
1076 | #single_italic
1077 |
1078 |
1079 | include
1080 | #single_literal_nopassthru
1081 |
1082 |
1083 | include
1084 | #single_unquoted
1085 |
1086 |
1087 | include
1088 | #superscript
1089 |
1090 |
1091 | include
1092 | #subscript
1093 |
1094 |
1095 | include
1096 | #characters
1097 |
1098 |
1099 |
1100 |
1101 | match
1102 | (?x)
1103 | (?<attlist>\[[^\]]*?\])? # might start with attribute list
1104 | (?<!\\) # must not be preceded by escape
1105 | (?<delim>\+\+)(?<inner>.*?)(?<closer>\k<delim>) # anything surrounded by double plus
1106 |
1107 | name
1108 | string.other.literal.double.asciidoc
1109 |
1110 | double_quote
1111 |
1112 | captures
1113 |
1114 | attlist
1115 |
1116 | name
1117 | support.variable.attributelist.asciidoc
1118 |
1119 | closer
1120 |
1121 | name
1122 | punctuation.definition.string.quoted.double.end.asciidoc
1123 |
1124 | delim
1125 |
1126 | name
1127 | punctuation.definition.string.quoted.double.begin.asciidoc
1128 |
1129 | inner
1130 |
1131 | name
1132 | meta.doublequotedinner.asciidoc
1133 | patterns
1134 |
1135 |
1136 | include
1137 | #double_bold
1138 |
1139 |
1140 | include
1141 | #double_italic
1142 |
1143 |
1144 | include
1145 | #double_literal
1146 |
1147 |
1148 | include
1149 | #double_unquoted
1150 |
1151 |
1152 | include
1153 | #single_bold
1154 |
1155 |
1156 | include
1157 | #single_italic
1158 |
1159 |
1160 | include
1161 | #single_literal
1162 |
1163 |
1164 | include
1165 | #single_literal_nopassthru
1166 |
1167 |
1168 | include
1169 | #single_unquoted
1170 |
1171 |
1172 | include
1173 | #superscript
1174 |
1175 |
1176 | include
1177 | #subscript
1178 |
1179 |
1180 | include
1181 | #characters
1182 |
1183 |
1184 |
1185 |
1186 | match
1187 | (?x)
1188 | (?<attlist>\[[^\]]*?\])? # might start with attribute list
1189 | (?<!\w|\\) # cannot be preceded by word character or escape
1190 | (?<delim>``)(?<inner>(?!\s).*?(?<!\s))(?<closer>'') # double backtick followed by non-space, anything, double-apostrophe preceded by non-space
1191 | (?!\w) # cannot be followed by word character either
1192 |
1193 | name
1194 | string.quoted.double.asciidoc
1195 |
1196 | double_unquoted
1197 |
1198 | captures
1199 |
1200 | attlist
1201 |
1202 | name
1203 | support.variable.attributelist.asciidoc
1204 |
1205 | closer
1206 |
1207 | name
1208 | punctuation.definition.string.unquoted.double.end.asciidoc
1209 |
1210 | delim
1211 |
1212 | name
1213 | punctuation.definition.string.unquoted.double.begin.asciidoc
1214 |
1215 | inner
1216 |
1217 | name
1218 | string.unquoted.unquotedinner.double.asciidoc
1219 | patterns
1220 |
1221 |
1222 | include
1223 | #double_bold
1224 |
1225 |
1226 | include
1227 | #double_italic
1228 |
1229 |
1230 | include
1231 | #double_literal
1232 |
1233 |
1234 | include
1235 | #double_quote
1236 |
1237 |
1238 | include
1239 | #single_bold
1240 |
1241 |
1242 | include
1243 | #single_italic
1244 |
1245 |
1246 | include
1247 | #single_literal
1248 |
1249 |
1250 | include
1251 | #single_literal_nopassthru
1252 |
1253 |
1254 | include
1255 | #superscript
1256 |
1257 |
1258 | include
1259 | #subscript
1260 |
1261 |
1262 | include
1263 | #characters
1264 |
1265 |
1266 |
1267 |
1268 | match
1269 | (?x)
1270 | (?<attlist>\[[^\]]*?\])? # might start with an attribute list (indeed, that is its purpose)
1271 | (?<!\\) # must not be preceded by escape
1272 | (?<delim>\#\#)(?<inner>.*?)(?<closer>\k<delim>) # anything surrounded by double hashes
1273 |
1274 | name
1275 | string.other.unquoted.double.asciidoc
1276 |
1277 | passthru
1278 |
1279 | captures
1280 |
1281 | 1
1282 |
1283 | name
1284 | constant.character.passthru.begin.asciidoc
1285 |
1286 | 2
1287 |
1288 | name
1289 | variable.parameter.passthruinner.asciidoc
1290 | patterns
1291 |
1292 |
1293 | include
1294 | text.xml
1295 |
1296 |
1297 |
1298 | 3
1299 |
1300 | name
1301 | constant.character.passthru.end.asciidoc
1302 |
1303 |
1304 | comment
1305 | must be dead first among the inlines, so as to take priority
1306 | match
1307 | (\+\+\+|\$\$)(.*?)(\1)
1308 | name
1309 | meta.passthru.inline.asciidoc
1310 |
1311 | single_bold
1312 |
1313 | captures
1314 |
1315 | attlist
1316 |
1317 | name
1318 | support.variable.attributelist.asciidoc
1319 |
1320 | closer
1321 |
1322 | name
1323 | punctuation.definition.bold.single.end.asciidoc
1324 |
1325 | delim
1326 |
1327 | name
1328 | punctuation.definition.bold.single.begin.asciidoc
1329 |
1330 | inner
1331 |
1332 | name
1333 | meta.boldinner.single.asciidoc
1334 | patterns
1335 |
1336 |
1337 | include
1338 | #double_italic
1339 |
1340 |
1341 | include
1342 | #double_literal
1343 |
1344 |
1345 | include
1346 | #double_unquoted
1347 |
1348 |
1349 | include
1350 | #double_quote
1351 |
1352 |
1353 | include
1354 | #single_italic
1355 |
1356 |
1357 | include
1358 | #single_literal
1359 |
1360 |
1361 | include
1362 | #single_literal_nopassthru
1363 |
1364 |
1365 | include
1366 | #single_unquoted
1367 |
1368 |
1369 | include
1370 | #superscript
1371 |
1372 |
1373 | include
1374 | #subscript
1375 |
1376 |
1377 | include
1378 | #characters
1379 |
1380 |
1381 |
1382 |
1383 | match
1384 | (?x)
1385 | (?<attlist>\[[^\]]*?\])? # might start with an attributes list
1386 | (?<=^|\W)(?<!\\) # must be preceded by a nonword character, and not by an escape
1387 | (?<delim>\*)(?<inner>(?!\s).*?(?<!\s))(?<closer>\k<delim>) # delimiter *, no space, anything, no space, delimiter...
1388 | (?!\w) # ... and must be followed by nonword character
1389 |
1390 | name
1391 | markup.bold.single.asciidoc
1392 |
1393 | single_italic
1394 |
1395 | captures
1396 |
1397 | attlist
1398 |
1399 | name
1400 | support.variable.attributelist.asciidoc
1401 |
1402 | closer
1403 |
1404 | name
1405 | punctuation.definition.italic.single.end.asciidoc
1406 |
1407 | delim
1408 |
1409 | name
1410 | punctuation.definition.italic.single.begin.asciidoc
1411 |
1412 | inner
1413 |
1414 | name
1415 | meta.italicinner.single.asciidoc
1416 | patterns
1417 |
1418 |
1419 | include
1420 | #double_bold
1421 |
1422 |
1423 | include
1424 | #double_literal
1425 |
1426 |
1427 | include
1428 | #double_unquoted
1429 |
1430 |
1431 | include
1432 | #double_quote
1433 |
1434 |
1435 | include
1436 | #single_bold
1437 |
1438 |
1439 | include
1440 | #single_literal
1441 |
1442 |
1443 | include
1444 | #single_literal_nopassthru
1445 |
1446 |
1447 | include
1448 | #single_unquoted
1449 |
1450 |
1451 | include
1452 | #superscript
1453 |
1454 |
1455 | include
1456 | #subscript
1457 |
1458 |
1459 | include
1460 | #characters
1461 |
1462 |
1463 |
1464 |
1465 | match
1466 | (?x)
1467 | (?<attlist>\[[^\]]*?\])? # might be preceded by an attributes list
1468 | (?<=^|\W)(?<!\\) # must be preceded by a nonword character, and not by an escape
1469 | (?<delim>_)(?<inner>(?!\s).*?(?<!\s))(?<closer>\k<delim>) # delimiter underscore, nonspace, anything, nonspace, delimiter
1470 | (?!\w) # and must by followed by nonword character
1471 |
1472 | name
1473 | markup.italic.single.asciidoc
1474 |
1475 | single_literal
1476 |
1477 | captures
1478 |
1479 | attlist
1480 |
1481 | name
1482 | support.variable.attributelist.asciidoc
1483 |
1484 | closer
1485 |
1486 | name
1487 | punctuation.definition.literal.single.end.asciidoc
1488 |
1489 | delim
1490 |
1491 | name
1492 | punctuation.definition.literal.single.begin.asciidoc
1493 |
1494 | inner
1495 |
1496 | name
1497 | meta.literalinner.single.asciidoc
1498 | patterns
1499 |
1500 |
1501 | include
1502 | #double_bold
1503 |
1504 |
1505 | include
1506 | #double_italic
1507 |
1508 |
1509 | include
1510 | #double_unquoted
1511 |
1512 |
1513 | include
1514 | #double_quote
1515 |
1516 |
1517 | include
1518 | #single_bold
1519 |
1520 |
1521 | include
1522 | #single_italic
1523 |
1524 |
1525 | include
1526 | #single_literal_nopassthru
1527 |
1528 |
1529 | include
1530 | #single_unquoted
1531 |
1532 |
1533 | include
1534 | #superscript
1535 |
1536 |
1537 | include
1538 | #subscript
1539 |
1540 |
1541 | include
1542 | #characters
1543 |
1544 |
1545 |
1546 |
1547 | match
1548 | (?x)
1549 | (?<attlist>\[[^\]]*?\])? # might start with attributes list
1550 | (?<=^|\W)(?<!\\) # must be preceded by a nonword character, and not by escape
1551 | (?<delim>\+)(?<inner>(?!\s).*?(?<!\s))(?<closer>\k<delim>) # delimiter plus, nonspace, anything, nonspace, delimiter
1552 | (?!\w) # and must be followed by nonword character
1553 |
1554 | name
1555 | string.other.literal.single.asciidoc
1556 |
1557 | single_literal_nopassthru
1558 |
1559 | captures
1560 |
1561 | closer
1562 |
1563 | name
1564 | punctuation.definition.literal.single.nopassthru.end.asciidoc
1565 |
1566 | delim
1567 |
1568 | name
1569 | punctuation.definition.literal.single.nopassthru.begin.asciidoc
1570 |
1571 | inner
1572 |
1573 | name
1574 | meta.literalinner.single.nopassthru.asciidoc
1575 |
1576 |
1577 | match
1578 | (?x)
1579 | (?<!\w|\\) # must not be preceded by word character or escape
1580 | (?<delim>`)(?<inner>(?!\s).*?(?<!\s))(?<closer>\k<delim>) # delimiter backtick, nonspace, anything, nonspace, delimiter
1581 | (?!\w) # and must be followed by nonword character
1582 |
1583 | name
1584 | string.other.literal.nopassthru.asciidoc
1585 |
1586 | single_unquoted
1587 |
1588 | captures
1589 |
1590 | attlist
1591 |
1592 | name
1593 | support.variable.attributelist.asciidoc
1594 |
1595 | closer
1596 |
1597 | name
1598 | punctuation.definition.string.unquoted.single.end.asciidoc
1599 |
1600 | delim
1601 |
1602 | name
1603 | punctuation.definition.string.unquoted.single.begin.asciidoc
1604 |
1605 | inner
1606 |
1607 | name
1608 | string.unquoted.unquotedinner.single.asciidoc
1609 | patterns
1610 |
1611 |
1612 | include
1613 | #double_bold
1614 |
1615 |
1616 | include
1617 | #double_italic
1618 |
1619 |
1620 | include
1621 | #double_literal
1622 |
1623 |
1624 | include
1625 | #double_quote
1626 |
1627 |
1628 | include
1629 | #single_bold
1630 |
1631 |
1632 | include
1633 | #single_italic
1634 |
1635 |
1636 | include
1637 | #single_literal
1638 |
1639 |
1640 | include
1641 | #single_literal_nopassthru
1642 |
1643 |
1644 | include
1645 | #superscript
1646 |
1647 |
1648 | include
1649 | #subscript
1650 |
1651 |
1652 | include
1653 | #characters
1654 |
1655 |
1656 |
1657 |
1658 | match
1659 | (?x)
1660 | (?<attlist>\[[^\]]*?\])? # might start with attribute list (darned well better or why are we here)
1661 | (?<=^|\W)(?<!\\) # must be preceded by nonword character, and not by escape
1662 | (?<delim>\#)(?<inner>(?!\s).*?(?<!\s))(?<closer>\k<delim>) # delimiter hash, nonspace, anything, nonspace, delimiter
1663 | (?!\w) # and must be followed by nonword character
1664 |
1665 | name
1666 | string.other.unquoted.single.asciidoc
1667 |
1668 | subscript
1669 |
1670 | captures
1671 |
1672 | attlist
1673 |
1674 | name
1675 | support.variable.attributelist.asciidoc
1676 |
1677 | closer
1678 |
1679 | name
1680 | punctuation.definition.string.subscript.end.asciidoc
1681 |
1682 | delim
1683 |
1684 | name
1685 | punctuation.definition.string.subscript.begin.asciidoc
1686 |
1687 | inner
1688 |
1689 | name
1690 | meta.subscriptinner.asciidoc
1691 | patterns
1692 |
1693 |
1694 | include
1695 | #double_bold
1696 |
1697 |
1698 | include
1699 | #double_italic
1700 |
1701 |
1702 | include
1703 | #double_literal
1704 |
1705 |
1706 | include
1707 | #double_unquoted
1708 |
1709 |
1710 | include
1711 | #double_quote
1712 |
1713 |
1714 | include
1715 | #single_bold
1716 |
1717 |
1718 | include
1719 | #single_italic
1720 |
1721 |
1722 | include
1723 | #single_literal
1724 |
1725 |
1726 | include
1727 | #single_literal_nopassthru
1728 |
1729 |
1730 | include
1731 | #single_unquoted
1732 |
1733 |
1734 | include
1735 | #superscript
1736 |
1737 |
1738 | include
1739 | #characters
1740 |
1741 |
1742 |
1743 |
1744 | match
1745 | (?x)
1746 | (?<attlist>\[[^\]]*?\])? # might start with attribute list
1747 | (?<!\\) # must not be preceded by escape
1748 | (?<delim>~)(?<inner>.*?)(?<closer>\k<delim>) # twiddle anything twiddle
1749 |
1750 | name
1751 | string.other.subscript.asciidoc
1752 |
1753 | superscript
1754 |
1755 | captures
1756 |
1757 | attlist
1758 |
1759 | name
1760 | support.variable.attributelist.asciidoc
1761 |
1762 | closer
1763 |
1764 | name
1765 | punctuation.definition.string.superscript.end.asciidoc
1766 |
1767 | delim
1768 |
1769 | name
1770 | punctuation.definition.string.superscript.begin.asciidoc
1771 |
1772 | inner
1773 |
1774 | name
1775 | meta.superscriptinner.asciidoc
1776 | patterns
1777 |
1778 |
1779 | include
1780 | #double_bold
1781 |
1782 |
1783 | include
1784 | #double_italic
1785 |
1786 |
1787 | include
1788 | #double_literal
1789 |
1790 |
1791 | include
1792 | #double_unquoted
1793 |
1794 |
1795 | include
1796 | #double_quote
1797 |
1798 |
1799 | include
1800 | #single_bold
1801 |
1802 |
1803 | include
1804 | #single_italic
1805 |
1806 |
1807 | include
1808 | #single_literal
1809 |
1810 |
1811 | include
1812 | #single_literal_nopassthru
1813 |
1814 |
1815 | include
1816 | #single_unquoted
1817 |
1818 |
1819 | include
1820 | #subscript
1821 |
1822 |
1823 | include
1824 | #characters
1825 |
1826 |
1827 |
1828 |
1829 | match
1830 | (?x)
1831 | (?<attlist>\[[^\]]*?\])? # might start with attribute list
1832 | (?<!\\) # no preceding escape
1833 | (?<delim>\^)(?<inner>.*?)(?<closer>\k<delim>) # caret anything caret
1834 |
1835 | name
1836 | string.other.superscript.asciidoc
1837 |
1838 |
1839 |
1840 | lines
1841 |
1842 | patterns
1843 |
1844 |
1845 | include
1846 | #comment
1847 |
1848 |
1849 | include
1850 | #list_continuation
1851 |
1852 |
1853 | include
1854 | #linebreak
1855 |
1856 |
1857 | include
1858 | #pagebreak
1859 |
1860 |
1861 | include
1862 | #ruler
1863 |
1864 |
1865 | include
1866 | #block_heading
1867 |
1868 |
1869 | include
1870 | #block_id
1871 |
1872 |
1873 | include
1874 | #section_template
1875 |
1876 |
1877 | include
1878 | #attribute_list_line
1879 |
1880 |
1881 | include
1882 | #attribute_entry
1883 |
1884 |
1885 | repository
1886 |
1887 | attribute_entry
1888 |
1889 | captures
1890 |
1891 | attrname
1892 |
1893 | name
1894 | support.variable.attribute.asciidoc
1895 |
1896 | attrvalue
1897 |
1898 | name
1899 | meta.attributeentry.value.asciidoc
1900 | patterns
1901 |
1902 |
1903 | include
1904 | #characters
1905 |
1906 |
1907 |
1908 | closer
1909 |
1910 | name
1911 | punctuation.definition.attributeentry.attrname.end.asciidoc
1912 |
1913 | delim
1914 |
1915 | name
1916 | punctuation.definition.attributeentry.attrname.begin.asciidoc
1917 |
1918 |
1919 | match
1920 | ^(?<attrname>(?<delim>:)(\w[^.]*?)(\.(.*?))?(?<closer>:))(\s+(?<attrvalue>.*))?$\n?
1921 | name
1922 | meta.attributeentry.asciidoc
1923 |
1924 | attribute_list_line
1925 |
1926 | captures
1927 |
1928 | 1
1929 |
1930 | name
1931 | punctuation.definition.attributelistline.begin.asciidoc
1932 |
1933 | 2
1934 |
1935 | name
1936 | punctuation.definition.attributelistline.end.asciidoc
1937 |
1938 |
1939 | comment
1940 | Attribute list as paragraph: single brackets. No need for special treatment of escape; follows literal block, section template as being a more general regex
1941 | match
1942 | ^(\[)[^\[\]]*(\])\s*$\n?
1943 | name
1944 | support.variable.attributelist.asciidoc
1945 |
1946 | block_heading
1947 |
1948 | captures
1949 |
1950 | 1
1951 |
1952 | name
1953 | punctuation.definition.blockheading.asciidoc
1954 |
1955 |
1956 | comment
1957 | A line beginning with a period and no space
1958 | match
1959 | ^(\.)\w.*$\n?
1960 | name
1961 | markup.heading.block.asciidoc
1962 |
1963 | block_id
1964 |
1965 | captures
1966 |
1967 | 1
1968 |
1969 | name
1970 | punctuation.definition.blockid.begin.asciidoc
1971 |
1972 | 2
1973 |
1974 | name
1975 | markup.underline.blockid.id.asciidoc
1976 |
1977 | 3
1978 |
1979 | name
1980 | punctuation.definition.blockid.end.asciidoc
1981 |
1982 |
1983 | comment
1984 | A line surrounded by double square brackets
1985 | match
1986 | ^(\[\[)([^\[].*)(\]\])\s*$\n?
1987 | name
1988 | meta.tag.blockid.asciidoc
1989 |
1990 | comment
1991 |
1992 | captures
1993 |
1994 | 1
1995 |
1996 | name
1997 | punctuation.definition.comment.line.asciidoc
1998 |
1999 | 2
2000 |
2001 | name
2002 | meta.line.comment.content.asciidoc
2003 |
2004 |
2005 | match
2006 | ^(//)([^/\n].*|)$\n?
2007 | name
2008 | comment.line.double-slash.asciidoc
2009 |
2010 | linebreak
2011 |
2012 | match
2013 | (?<=\s)\+$\n?
2014 | name
2015 | constant.linebreak.asciidoc
2016 |
2017 | list_continuation
2018 |
2019 | match
2020 | ^\+\s*$\n?
2021 | name
2022 | constant.listcontinuation.asciidoc
2023 |
2024 | pagebreak
2025 |
2026 | match
2027 | ^<{3,}$\n?
2028 | name
2029 | meta.separator.pagebreak.asciidoc
2030 |
2031 | ruler
2032 |
2033 | match
2034 | ^'{3,}$\n?
2035 | name
2036 | meta.separator.ruler.asciidoc
2037 |
2038 | section_template
2039 |
2040 | captures
2041 |
2042 | 1
2043 |
2044 | name
2045 | punctuation.definition.sectiontemplate.begin.asciidoc
2046 |
2047 | 4
2048 |
2049 | name
2050 | meta.tag.sectiontemplate.asciidoc
2051 |
2052 | 6
2053 |
2054 | name
2055 | punctuation.definition.sectiontemplate.end.asciidoc
2056 |
2057 | 7
2058 |
2059 | name
2060 | punctuation.definition.sectiontemplate.end.asciidoc
2061 |
2062 |
2063 | comment
2064 | fixed list of known template names
2065 | match
2066 | (?x)^
2067 | (\[) # in square brackets
2068 | (template\s*=\s*)?(")? # might start with template-equals and might have template name in quotes
2069 | (
2070 | sect\d|abstract|preface|colophon|dedication|glossary|bibliography|synopsis|appendix|index # fixed list of known templates
2071 | )
2072 | (".*(\])|(\])) # either close the quote (and perhaps go on) and close the bracket, or close the bracket immediately
2073 | \s*$\n?
2074 | name
2075 | variable.parameter.sectiontemplate.asciidoc
2076 |
2077 |
2078 |
2079 | lists
2080 |
2081 | comment
2082 | My strategy for lists (and similar) is not to try to treat entire paragraphs as lists, but only call out the opening
2083 | patterns
2084 |
2085 |
2086 | include
2087 | #admonition_word
2088 |
2089 |
2090 | include
2091 | #bulleted_list
2092 |
2093 |
2094 | include
2095 | #numbered_list_dotted
2096 |
2097 |
2098 | include
2099 | #numbered_list_numeric
2100 |
2101 |
2102 | include
2103 | #numbered_list_roman
2104 |
2105 |
2106 | include
2107 | #labeled_list
2108 |
2109 |
2110 | include
2111 | #labeled_list_semicolons
2112 |
2113 |
2114 | include
2115 | #callout_list
2116 |
2117 |
2118 | repository
2119 |
2120 | admonition_word
2121 |
2122 | comment
2123 | NOTE:, TIP:, IMPORTANT:, WARNING: or CAUTION:
2124 | match
2125 | ^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):(?=\s+)
2126 | name
2127 | support.constant.admonitionword.asciidoc
2128 |
2129 | bulleted_list
2130 |
2131 | captures
2132 |
2133 | 1
2134 |
2135 | name
2136 | string.unquoted.list.bullet.asciidoc
2137 |
2138 | 2
2139 |
2140 | name
2141 | constant.numeric.list.bullet.asciidoc
2142 |
2143 |
2144 | match
2145 | ^(\s*(\-|\*{1,5}))\s+(?=\w)
2146 | name
2147 | markup.list.bulleted.asciidoc
2148 |
2149 | callout_list
2150 |
2151 | captures
2152 |
2153 | 1
2154 |
2155 | name
2156 | string.unquoted.list.callout.asciidoc
2157 |
2158 | 2
2159 |
2160 | name
2161 | constant.numeric.callout.asciidoc
2162 |
2163 | 3
2164 |
2165 | name
2166 | punctuation.definition.calloutlistnumber.begin.asciidoc
2167 |
2168 | 4
2169 |
2170 | name
2171 | punctuation.definition.calloutlistnumber.end.asciidoc
2172 |
2173 |
2174 | match
2175 | ^(\s*((<)\d+?(>)))\s+(?=\w)
2176 | name
2177 | markup.list.numbered.callout.asciidoc
2178 |
2179 | labeled_list
2180 |
2181 | captures
2182 |
2183 | 1
2184 |
2185 | name
2186 | meta.list.label.asciidoc
2187 | patterns
2188 |
2189 |
2190 | include
2191 | #inline
2192 |
2193 |
2194 | include
2195 | #characters
2196 |
2197 |
2198 |
2199 | 2
2200 |
2201 | name
2202 | constant.labeledlist.separator.asciidoc
2203 |
2204 |
2205 | match
2206 | ^\s*(.*)(?<!:)(:{2,4})(\s|$\n?)
2207 | name
2208 | markup.list.labeled.asciidoc
2209 |
2210 | labeled_list_semicolons
2211 |
2212 | captures
2213 |
2214 | 1
2215 |
2216 | name
2217 | meta.list.label.asciidoc
2218 | patterns
2219 |
2220 |
2221 | include
2222 | #inline
2223 |
2224 |
2225 | include
2226 | #characters
2227 |
2228 |
2229 |
2230 | 2
2231 |
2232 | name
2233 | constant.labeledlist.separator.asciidoc
2234 |
2235 |
2236 | match
2237 | ^\s*(.*)(?<!;)(;{2})(\s|$\n?)
2238 | name
2239 | markup.list.labeled.semicolons.asciidoc
2240 |
2241 | numbered_list_dotted
2242 |
2243 | captures
2244 |
2245 | 1
2246 |
2247 | name
2248 | string.unquoted.list.dotted.asciidoc
2249 |
2250 | 2
2251 |
2252 | name
2253 | constant.numeric.list.dot.asciidoc
2254 |
2255 |
2256 | comment
2257 | The space distinguishes it from a block title
2258 | match
2259 | ^(\s*(\.{1,5}))\s+(?=\w)
2260 | name
2261 | markup.list.numbered.dotted.asciidoc
2262 |
2263 | numbered_list_numeric
2264 |
2265 | captures
2266 |
2267 | 1
2268 |
2269 | name
2270 | string.unquoted.list.numeric.asciidoc
2271 |
2272 | 2
2273 |
2274 | name
2275 | constant.numeric.list.number.asciidoc
2276 |
2277 |
2278 | match
2279 | ^(\s*([1-9a-zA-Z][0-9]*\.))\s+(?=\w)
2280 | name
2281 | markup.list.numbered.numeric.asciidoc
2282 |
2283 | numbered_list_roman
2284 |
2285 | captures
2286 |
2287 | 1
2288 |
2289 | name
2290 | string.unquoted.list.roman.asciidoc
2291 |
2292 | 2
2293 |
2294 | name
2295 | constant.numeric.list.romannumeral.asciidoc
2296 |
2297 |
2298 | match
2299 | ^(\s*([ivxIVX]+\)))\s+(?=\w)
2300 | name
2301 | markup.list.numbered.roman.asciidoc
2302 |
2303 |
2304 |
2305 | titles
2306 |
2307 | patterns
2308 |
2309 |
2310 | include
2311 | #setext_title
2312 |
2313 |
2314 | include
2315 | #level_title
2316 |
2317 |
2318 | repository
2319 |
2320 | level_title
2321 |
2322 | captures
2323 |
2324 | eq
2325 |
2326 | name
2327 | punctuation.definition.heading.asciidoc
2328 |
2329 | title
2330 |
2331 | name
2332 | entity.name.section.asciidoc
2333 |
2334 |
2335 | match
2336 | ^(?<eq>={1,5}) (?<title>\w.*)$\n?
2337 | name
2338 | markup.heading.level.${eq/=(?<two>=)?(?<three>=)?(?<four>=)?(?<five>=)?/${five:?4:${four:?3:${three:?2:${two:?1:0}}}}/}.asciidoc
2339 |
2340 | setext_title
2341 |
2342 | comment
2343 | Alas, all we can do is mark the second line; TextMate cannot do double-line patterns
2344 | match
2345 | ^(=|-|~|\^|\+){6,}\s*$\n?
2346 | name
2347 | markup.heading.setext.n.asciidoc
2348 |
2349 |
2350 |
2351 |
2352 | scopeName
2353 | text.asciidoc
2354 | uuid
2355 | 961C6043-B725-4E2D-83E8-114BF3A7389D
2356 |
2357 |
2358 |
--------------------------------------------------------------------------------
/info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | contactEmailRot13
6 | zngg@gvqovgf.pbz
7 | contactName
8 | Matt Neuburg
9 | description
10 | Editor for AsciiDoc files (http://asciidoc.org). Rendering will vary according to need and installation and is left mostly up to the user.
11 | name
12 | AsciiDoc
13 | uuid
14 | A82A9BCD-043E-4711-9CC2-DC88A72E12BE
15 |
16 |
17 |
--------------------------------------------------------------------------------
/testing.asciidoc:
--------------------------------------------------------------------------------
1 | :rq: ’
2 | :Right Quote: ’
3 | :Right.Quote: ’
4 |
5 | Level 0 Section Title
6 | =====================
7 |
8 | blah di blah: the number of underlines must _exactly_ match the length of the title (except for trailing spaces), but there is no way TextMate can know about that, so we just look for five or more and pray
9 |
10 | Level 1 Section Title
11 | ---------------------
12 |
13 | blah di blah
14 |
15 | Level 2 Subsection Title
16 | ~~~~~~~~~~~~~~~~~~~~~~~~
17 |
18 | blah di blah
19 |
20 | Level 3 Subsection Title
21 | ^^^^^^^^^^^^^^^^^^^^^^^^
22 |
23 | blah di blah
24 |
25 | Level 4 Subsection Title
26 | ++++++++++++++++++++++++
27 |
28 | blah di blah
29 |
30 | = Level 0 section title
31 |
32 | blah di blah
33 |
34 | == Level 1 section title
35 |
36 | blah di blah
37 |
38 | === Level 2 section title
39 |
40 | blah di blah
41 |
42 | ==== Level 3 section title
43 |
44 | blah di blah
45 |
46 | ===== Level 4 section title
47 |
48 | blah di blah
49 |
50 | This _is italic_ and this is_n't_. But this (_is_). This is __too_ because the second is inside.
51 |
52 | _An italic line._
53 |
54 | This *is bold* and this is*n't*. But this (,*is*). This is **too* because the second is inside.
55 |
56 | *A bold line.*
57 |
58 | This is _italic containing *bold* text_, while this is *bold text containing _italic_ text*.
59 |
60 | +A literal line.+
61 |
62 | This +is literal+ and this is+n't+.
63 |
64 | This is +literal #containing# *bold* text+ and this is +literal containing _italic_ text+.
65 |
66 | This is *bold containing +literal+ text*, and this is _italic containing +literal+ text_.
67 |
68 | This is *not bold
69 |
70 | because we do not cross* paragraph boundaries in our implementation.
71 |
72 | This is *also bold** despite the second asterisk at the end.
73 |
74 | This is *bold in Asciidoc
75 | but not in TextMate*, because we have no good way to distinguish
76 | single from double linefeed (as far as I know).
77 |
78 | This is \*not bold* and this is \_not italic_ and this is \+not literal+ because of the backslash.
79 |
80 | This is a `literal` without internal passthru. Thus it does not `contain *bold* or _italic_ or ``quotes'' inside itself, and if it includes replacements like (C) or -- or ➊ that would be a bug`. It does not take an attribute list either, as we see [here]`like this`. Other styles of passthru are +++this+++ and $$this$$. Also there is a pass macro which I treat as a special case pass:none[this]
81 |
82 | `A literal line.`
83 |
84 | This is a ``double quoted string'' of the normal type and this is``n't''. What happens in the second case is that AsciiDoc sees a single quoted string with an extra backtick on one side and an extra apostrophe on the other side. But that feels like a bug to me. I don't code for it. Do not taunt happy fun ball.
85 |
86 | ``A double quoted string line.''
87 |
88 | This is a [list]`single quoted string, isn't it?' of the normal type. But I have not coded for this; I don't use them (I use explicit curly quotes instead).
89 |
90 | You can get a messy situation: ```Like this.''' AsciiDoc deals badly with that. That is another reason why I tend to use literal curly single quotes.
91 |
92 | There is also [list]#unquoted# text (which can occur in mid[list]##wo##rd). As you can see they are useful with attribute lists.
93 |
94 | #An unquoted line.#
95 |
96 | This is +literal with a ``quoted'' string+. This is *bold with a ``quoted'' string*. This is _italic with a ``quoted'' string_. This is a ``quoted string containing +literal+ and *bold* and _italic_ inside it.''
97 |
98 | This is what you get when there is an & by itself: nothing! No need to mark it as invalid; AsciiDoc will fix it for you.
99 |
100 | This is b__ unconstrained**emphasized**text __b.
101 | This is b** unconstrained__strong__text **b.
102 | This is b++ obviously**unconstrained__monospaced__text**obviously ++b.
103 | Can ++double literal contain `single literal no passthru` or what++? Looks okay so we will allow it to stand.
104 |
105 | Here we have some ^_superscripted_^ text and some ~subscripted~ text. Can +lit^er^al+ contain it? Can ++double lit^er^al++ contain it? Yes it can, and so can all the other quotes. Here we have a linebreak +
106 | before we proceed. _Even in italics, we can have copyright (C) or trademark (TM) or register (R) as well as dash -- as well as ellipse ... And there is -> arrow this way and <- arrow that way, plus => snazzier arrow this way and <= snazzier arrow that way._
107 |
108 | Absolutely _any_ of the quoted types, except for the no-passthru literal, may be immediately preceded by square brackets, even if they do not normally activate after a non-word character: for example [like]_this_ or [like]^this^. Those square brackets are an attribute list and we must call them to the user's attention, as they will be removed during processing: they are processing instructions, not text. [like]+this+ for example or [like]*this* even.
109 |
110 | [bogus]
111 | Notice that the previous line is removed. It is treated as an attributes list applied to the following block (and raises a warning because there is no ``bogus'' attribute). Thus we mark it for the user's attention. Here is an example where that is actually useful:
112 |
113 | [literal]
114 | This is *not bold* because we have marked it with the literal attribute.
115 | I don't support the indentation way of doing literal paragraphs;
116 | use the attribute or literal block instead.
117 | Callouts work here. <1>
118 |
119 | <1> Nice callout, dude. I need _italics_ and things to work here, you know.
120 |
121 | This is a normal paragraph.
122 |
123 | ....
124 | There is also a literal block.
125 | It is delimited by four or more periods.
126 | Thus this is *not bold*.
127 | But callouts work here. <1>
128 | ....
129 |
130 | <1> Another extremely nice callout.
131 |
132 | The following works, but I don't mark it in any special way except to inform the user that there is an attributes list:
133 |
134 | [quote, Bertrand Russell, The World of Mathematics (1956)]
135 | A good notation has subtlety and suggestiveness which at times makes
136 | it almost seem like a live teacher.
137 |
138 | TIP: Nothing _special_ happens here.
139 |
140 | [TIP]
141 | Nothing _special_ happens here either.
142 |
143 | In this paragraph we have some xml entities such as ➊ and ¶. And obviously they should work inside inlines, such as *bold with ➊ and ¶* and _italic with ➊ and ¶ as well_.
144 |
145 | <<<
146 |
147 | That was a pagebreak. Here comes a ruler.
148 |
149 | '''
150 |
151 | /////
152 | This is a comment block. I'd like to fold here but TextMate has an annoying rule that we can't fold if the start and end are identical. Therefore I've devised a special rule: if you want the folding, you have to have 5 (or more) slashes at the start, and four plus a space at the end. This differentiates them and allows the folding to operate.
153 | ////
154 |
155 | ----
156 | This is a listing block
157 | {
158 | Testing
159 | Testing more
160 | }
161 | {
162 | Testing
163 | testing more
164 | }
165 | Supposed to be used for code (and we get some yummy source goodness)
166 | Like this: "\n" (typed with control-n)
167 | Unlike AsciiDoc, TextMate can't differentiate
168 | the hyphens here from the hyphens used
169 | in setext
170 | Therefore I have an arbitrary rule that the setext is 6 or more...
171 | and the listing block delimiters must be exactly four or five.
172 | Please observe that callouts are active here. <1>
173 | I would not lie to you. <2>
174 | ----
175 |
176 | <1> Insofar as callouts are ever active.
177 | <2> I might, actually.
178 |
179 | .Notes
180 | - Note 1.
181 | - Note 2.
182 |
183 |
184 | [[terms1]]
185 | [glossary]
186 | List of Terms
187 | -------------
188 |
189 | Term:: Definition
190 |
191 | This is a xref:terms1[cross reference] and is marked as a macro. There is another <> style (can also look like <>) that I don't usually use, though it's very nice and I probably should use it (less error-prone).
192 |
193 | ["glossary",id="terms2"]
194 | List of Terms
195 | -------------
196 |
197 | Term:: Definition
198 |
199 | [template="glossary",id="terms3"]
200 | List of Terms
201 | -------------
202 |
203 | Term:: Definition
204 |
205 | .This Is a Sidebar
206 | *****
207 | We can put anything we like here, almost. Anything a full-fledged section title or another sidebar!
208 |
209 | ----
210 | For example
211 | it can contain code
212 | ----
213 |
214 | Once again I would like this to be foldable. The key _here_ is like the key for comments; to make this work, given TextMate's limitations, the first delimiter must be 5 or more, and the second must be exactly 4 plus a space.
215 |
216 | There can be a comment inside a sidebar, clearly.
217 |
218 | /////
219 | This is a comment inside the sidebar. The nested folding works, but of course it is up to you to get the numbers of delimiters right.
220 | ////
221 |
222 | ****
223 |
224 | And here we are outside the sidebar. And (here comes a quote block), in the words of Tom Lehrer:
225 |
226 | ____
227 | Life _is_ like a *sewer*. What you get out of it depends on what you put into it.
228 | ____
229 |
230 | This is an example block:
231 |
232 | .A great example
233 | ====
234 | ----
235 | Consisting typically
236 | of code (in my usage, anyway)
237 | ----
238 | ====
239 |
240 | But an example block can also be used for a note:
241 |
242 | [TIP]
243 | ====
244 | Don't drink the water, and don't breathe the air.
245 | ====
246 |
247 | Now comes a passthrough block. We get yummy XML goodness inside it.
248 |
249 | ++++
250 |
251 | Testing
252 |
253 |
254 |
255 | ++++
256 |
257 | Bulleted list with various levels of indentation. The whitespace at the start of the line is not significant to the AsciiDoc engine, which is looking solely at the symbols:
258 |
259 | - Lorem _ipsum_ dolor sit amet, consectetuer adipiscing elit.
260 | * Fusce euismod commodo velit.
261 | ** Qui in magna commodo, est labitur dolorum an. Est ne magna primis
262 | adolescens. Sit munere ponderum dignissim et. Minim luptatum et
263 | vel.
264 | ** Vivamus fringilla mi eu lacus.
265 | * Donec eget arcu bibendum nunc consequat lobortis.
266 | - Nulla porttitor vulputate libero.
267 |
268 | Numbered list using dots. Again, the whitespace is insignificant, and to prove it, I've varied it slightly:
269 |
270 | . Fusce euismod commodo velit.
271 | . Vivamus fringilla mi eu lacus.
272 | .. Fusce euismod commodo velit.
273 | .. Vivamus fringilla mi eu lacus.
274 | . Donec eget arcu bibendum nunc consequat lobortis.
275 |
276 | Numbered list using numbers. Again, the whitespace is insignificant:
277 |
278 | 1. Fusce euismod commodo velit.
279 | a. Fusce euismod commodo velit.
280 | b. Vivamus fringilla mi eu lacus.
281 | c. Donec eget arcu bibendum nunc consequat lobortis.
282 | 2. Vivamus fringilla mi eu lacus.
283 | i) Fusce euismod commodo velit.
284 | ii) Vivamus fringilla mi eu lacus.
285 | 3. Donec eget arcu bibendum nunc consequat lobortis.
286 | 4. Nam fermentum mattis ante.
287 |
288 | Labeled list (my favorite), and notice how the label includes inline and characters as expected:
289 |
290 | In +hoopla+::
291 | Lorem::
292 | Fusce euismod commodo velit.
293 | Ipsum:: Vivamus fringilla mi eu lacus.
294 | * Vivamus fringilla mi eu lacus.
295 | * Donec eget arcu bibendum nunc consequat lobortis.
296 | Dolor::
297 | Donec eget arcu bibendum nunc consequat lobortis.
298 | Suspendisse (C) ➊ yippee;;
299 | A massa id sem aliquam auctor.
300 | Morbi;;
301 | Pretium nulla vel lorem.
302 | In;;
303 | Dictum mauris in urna.
304 | Vivamus::: Fringilla mi eu lacus.
305 | Donec::: Eget arcu bibendum nunc consequat lobortis.
306 |
307 | A list with a list continuation:
308 |
309 | 1. List item one.
310 | +
311 | List item one continued with a second paragraph followed by an
312 | Indented block.
313 | +
314 | .................
315 | $ ls *.sh
316 | $ mv *.sh ~/tmp
317 | .................
318 | +
319 | List item continued with a third paragraph.
320 |
321 | 2. List item two continued with an open block.
322 | +
323 | --
324 | This paragraph is part of the preceding list item.
325 |
326 | a. This list is nested and does not require explicit item continuation.
327 | +
328 | This paragraph is part of the preceding list item.
329 |
330 | b. List item b.
331 |
332 | This paragraph belongs to item two of the outer list.
333 | --
334 |
335 | [bibliography]
336 | .Optional list title
337 | - [[[taoup]]] Eric Steven Raymond. 'The Art of UNIX
338 | Programming'. Addison-Wesley. ISBN 0-13-142901-9.
339 | - [[[walsh-muellner]]] Norman Walsh & Leonard Muellner.
340 | 'DocBook - The Definitive Guide'. O'Reilly & Associates.
341 | 1999. ISBN 1-56592-580-7.
342 |
343 | Three square brackets make a bibliography anchor. (I'm getting a false positive on the ``1999'' in the previous paragraph, as if it were a numbered list. But I don't care! And in fact AsciiDoc itself, when rendering, is giving exactly the same false positive.)
344 |
345 | A macro is marked by the colon (or, for a block macro, two colons) followed eventually by square brackets. There are other macro notations but I don't cover them in my syntax coloring. For example, I don't mark matt@tidbits.com, and I don't mark http://www.apeth.net (though TextMate already covers the second one). However, if you add the square brackets, as in mailto:matt@tidbits.com[], or http://www.apeth.net[], then it becomes my bailiwick.
346 |
347 | A footnote footnote:[An example footnote.]. It is just a form of macro. I don't use them.
348 | // Note to self: use them. (By the way, this is a comment.) I don't like the way this kind of comment soft-wraps with indentation by default, so I've used trickery to turn it off.
349 | // This is another comment. Next line is an empty comment.
350 | //
351 | testing
352 | // Comment.
353 |
354 | I do use ((indexes)), though.(((index term)))
355 |
356 | I do not use tables and have not coded for them.
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
--------------------------------------------------------------------------------