Update 2026-01-25 09:38 OpenBSD/amd64-t14
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
require_relative "spec_helper"
|
||||
|
||||
describe "autoformatting" do
|
||||
|
||||
let(:filename) { "autoformatting.md" }
|
||||
|
||||
it "should format long item lists" do
|
||||
before = <<-EOF.gsub /^ /, ""
|
||||
* long long long long long long long long long long long long long long long long long long long long long long long long
|
||||
|
||||
EOF
|
||||
# I don't know why but the interaction with vimrunner inserts a couple of
|
||||
# stars at the end
|
||||
expected = <<-EOF.gsub /^ /, ""
|
||||
* long long long long long long long long long long long long long long long
|
||||
long long long long long long long long long
|
||||
*
|
||||
*
|
||||
EOF
|
||||
given_content before do |source|
|
||||
vim.command "set textwidth=80"
|
||||
vim.normal "gggqq"
|
||||
vim.write
|
||||
expect(File.read(source)).to eql(expected)
|
||||
end
|
||||
end
|
||||
|
||||
it "should create new list items" do
|
||||
before = <<-EOF.gsub /^ /, ""
|
||||
* item
|
||||
EOF
|
||||
# I don't know why but the interaction with vimrunner inserts a couple of
|
||||
# stars at the end
|
||||
expected = <<-EOF.gsub /^ /, ""
|
||||
* item
|
||||
*
|
||||
*
|
||||
EOF
|
||||
given_content before do |source|
|
||||
vim.normal "ggA"
|
||||
vim.type "<CR>"
|
||||
vim.write
|
||||
given = File.read(source).gsub /[ ]+$/, ""
|
||||
expect(given).to eql(expected)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,31 @@
|
||||
require_relative "spec_helper"
|
||||
|
||||
describe "change header level" do
|
||||
|
||||
let(:filename) { "headers.md" }
|
||||
|
||||
it "should increase header of level 1 to level 2" do
|
||||
given_content "# Header" do |source|
|
||||
vim.command "call markdown#SwitchStatus()"
|
||||
vim.write
|
||||
expect(source).to have_content("## Header")
|
||||
end
|
||||
end
|
||||
|
||||
it "should increase header of level 3 to level 4" do
|
||||
given_content "### Header" do |source|
|
||||
vim.command "call markdown#SwitchStatus()"
|
||||
vim.write
|
||||
expect(source).to have_content("#### Header")
|
||||
end
|
||||
end
|
||||
|
||||
it "should go back to level 1 after level 6" do
|
||||
given_content "###### Header" do |source|
|
||||
vim.command "call markdown#SwitchStatus()"
|
||||
vim.write
|
||||
expect(source).to have_content("# Header")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,34 @@
|
||||
require_relative "spec_helper"
|
||||
|
||||
describe "change list items" do
|
||||
|
||||
let(:filename) { "list_items.md" }
|
||||
|
||||
["*", "+", "-"].each do |symbol|
|
||||
|
||||
it "should change from simple list (#{symbol}) to check list unchecked" do
|
||||
given_content "#{symbol} item" do |source|
|
||||
vim.command "call markdown#SwitchStatus()"
|
||||
vim.write
|
||||
expect(File.read(source)).to eql("#{symbol} [ ] item\n")
|
||||
end
|
||||
end
|
||||
|
||||
it "should change from check list unchecked (#{symbol}) to check list checked" do
|
||||
given_content "#{symbol} [ ] item" do |source|
|
||||
vim.command "call markdown#SwitchStatus()"
|
||||
vim.write
|
||||
expect(File.read(source)).to eql("#{symbol} [x] item\n")
|
||||
end
|
||||
end
|
||||
|
||||
it "should change from check list checked (#{symbol}) to simple list" do
|
||||
given_content "#{symbol} [x] item" do |source|
|
||||
vim.command "call markdown#SwitchStatus()"
|
||||
vim.write
|
||||
expect(File.read(source)).to eql("#{symbol} item\n")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
URL like http://google.com gets auto linked
|
||||
|
||||
URL may contain punctuation http://example.com/foo,bar,baz
|
||||
|
||||
URL may be preceded by punctuation !http://example.com/foo,bar,baz so the exclamation point is not part of the URL
|
||||
|
||||
URL are terminated by punctuation so http://example.com/foo, the comma is not part of the URL
|
||||
|
||||
URL may contain parenthesis http://example.com/(foo)?foo[1]=bar&foo[2]=baz
|
||||
|
||||
URL may be surrounded by parenthesis (http://example.com/foo) but parenthesis are not part of the URL
|
||||
|
||||
URL may terminate with parenthesis http://example.com/foo()
|
||||
|
||||
URL may be surrounded by parenthesis (http://example.com/foo()) but the surrounding parenthesis are not part of the URL
|
||||
|
||||
Email addresses bill@microsoft.com get auto linked
|
||||
|
||||
Path are supported /clean/code/that/works but they must be preceded by a non work because this /is a path and this/is not a path
|
||||
|
||||
Pull requests and issues are linked #42
|
||||
could be preceded by symbols \#42
|
||||
could not be preceded by letters a#42 or numbers 3#42
|
||||
|
||||
Reference to other users are linked @gabrielelana
|
||||
could be preceded by symbols \@gabrielelana
|
||||
could not be preceded by letters a@gabrielelana or numbers 3@gabrielelana
|
||||
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/autolinks.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Underlined { color: #c000c0; text-decoration: underline; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
URL like <span class="Underlined"><a href="http://google.com">http://google.com</a></span> gets auto linked
|
||||
|
||||
URL may contain punctuation <span class="Underlined"><a href="http://example.com/foo,bar,baz">http://example.com/foo,bar,baz</a></span>
|
||||
|
||||
URL may be preceded by punctuation !<span class="Underlined"><a href="http://example.com/foo,bar,baz">http://example.com/foo,bar,baz</a></span> so the exclamation point is not part of the URL
|
||||
|
||||
URL are terminated by punctuation so <span class="Underlined"><a href="http://example.com/foo">http://example.com/foo</a></span>, the comma is not part of the URL
|
||||
|
||||
URL may contain parenthesis <span class="Underlined"><a href="http://example.com/(foo)?foo[1]=bar&foo[2]=baz">http://example.com/(foo)?foo[1]=bar&foo[2]=baz</a></span>
|
||||
|
||||
URL may be surrounded by parenthesis (<span class="Underlined"><a href="http://example.com/foo">http://example.com/foo</a></span>) but parenthesis are not part of the URL
|
||||
|
||||
URL may terminate with parenthesis <span class="Underlined"><a href="http://example.com/foo()">http://example.com/foo()</a></span>
|
||||
|
||||
URL may be surrounded by parenthesis (<span class="Underlined"><a href="http://example.com/foo()">http://example.com/foo()</a></span>) but the surrounding parenthesis are not part of the URL
|
||||
|
||||
Email addresses <span class="Underlined">bill@microsoft.com</span> get auto linked
|
||||
|
||||
Path are supported <span class="Underlined">/clean/code/that/works</span> but they must be preceded by a non work because this <span class="Underlined">/is</span> a path and this/is not a path
|
||||
|
||||
Pull requests and issues are linked <span class="Underlined">#42</span>
|
||||
could be preceded by symbols \<span class="Underlined">#42</span>
|
||||
could not be preceded by letters a#42 or numbers 3#42
|
||||
|
||||
Reference to other users are linked <span class="Underlined">@gabrielelana</span>
|
||||
could be preceded by symbols \<span class="Underlined">@gabrielelana</span>
|
||||
could not be preceded by letters a@gabrielelana or numbers 3@gabrielelana
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,22 @@
|
||||
> This is a blockquote
|
||||
|
||||
> This is a blockquote even if the angle bracket is not at the beginning of the line
|
||||
|
||||
> This is a single
|
||||
> blockquote even if it
|
||||
> spans a few lines
|
||||
|
||||
> This is a single
|
||||
blockquote, you can put the angle bracket
|
||||
jnly at the first line of the paragraph and
|
||||
the all the paragraph is a blockquote
|
||||
|
||||
This is not a blockquote because it's another paragraph
|
||||
|
||||
>
|
||||
This is not a blockquote because the first line, the line with the angle bracket, must not be empty
|
||||
|
||||
>
|
||||
This is a blockquote because the first line, the line with the angle bracket, is not empty, in this case contains a single space
|
||||
|
||||
And again, this is not a blockquote because is another paragraph
|
||||
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/blockquotes.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Comment { color: #0000c0; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">> </span><span class="Comment">This is a blockquote</span>
|
||||
|
||||
<span class="Special"> > </span><span class="Comment">This is a blockquote even if the angle bracket is not at the beginning of the line</span>
|
||||
|
||||
<span class="Special">> </span><span class="Comment">This is a single</span>
|
||||
<span class="Special">> </span><span class="Comment">blockquote even if it</span>
|
||||
<span class="Special">> </span><span class="Comment">spans a few lines</span>
|
||||
|
||||
<span class="Special">> </span><span class="Comment">This is a single</span>
|
||||
<span class="Comment">blockquote, you can put the angle bracket</span>
|
||||
<span class="Comment">jnly at the first line of the paragraph and</span>
|
||||
<span class="Comment">the all the paragraph is a blockquote</span>
|
||||
|
||||
This is not a blockquote because it's another paragraph
|
||||
|
||||
>
|
||||
This is not a blockquote because the first line, the line with the angle bracket, must not be empty
|
||||
|
||||
<span class="Special">> </span>
|
||||
<span class="Comment">This is a blockquote because the first line, the line with the angle bracket, is not empty, in this case contains a single space</span>
|
||||
|
||||
And again, this is not a blockquote because is another paragraph
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,16 @@
|
||||
> First level blockquote
|
||||
> > Second level blockquote
|
||||
>> Second level blockquote
|
||||
> > > Third level blockquote
|
||||
>>> Third level blockquote
|
||||
|
||||
> # Nested elements problem
|
||||
> Nested elements inside blockquotes and other elements could be very problematic
|
||||
>
|
||||
> ## A conscious choice
|
||||
> I chose to not highlight nested elements because:
|
||||
> * things could get really nasty in the syntax definition
|
||||
> * the end result could get confusing for the user (ex. No difference in the highlight between an headline inside and outside a blockquote)
|
||||
>
|
||||
> ## An alternative solution
|
||||
> MdEditBlock will open the next level of the Blockquote block under cursor in a scratch buffer with a markdown syntax highlight
|
||||
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/blockquotes_nested.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Comment { color: #0000c0; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">> </span><span class="Comment">First level blockquote</span>
|
||||
<span class="Special">> > </span><span class="Comment">Second level blockquote</span>
|
||||
<span class="Special">>> </span><span class="Comment">Second level blockquote</span>
|
||||
<span class="Special">> > > </span><span class="Comment">Third level blockquote</span>
|
||||
<span class="Special">>>> </span><span class="Comment">Third level blockquote</span>
|
||||
|
||||
<span class="Special">> </span><span class="Comment"># Nested elements problem</span>
|
||||
<span class="Special">> </span><span class="Comment">Nested elements inside blockquotes and other elements could be very problematic</span>
|
||||
<span class="Special">></span>
|
||||
<span class="Special">> </span><span class="Comment">## A conscious choice</span>
|
||||
<span class="Special">> </span><span class="Comment">I chose to not highlight nested elements because:</span>
|
||||
<span class="Special">> </span><span class="Comment">* things could get really nasty in the syntax definition</span>
|
||||
<span class="Special">> </span><span class="Comment">* the end result could get confusing for the user (ex. No difference in the highlight between an headline inside and outside a blockquote)</span>
|
||||
<span class="Special">></span>
|
||||
<span class="Special">> </span><span class="Comment">## An alternative solution</span>
|
||||
<span class="Special">> </span><span class="Comment">MdEditBlock will open the next level of the Blockquote block under cursor in a scratch buffer with a markdown syntax highlight</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,76 @@
|
||||
This is inline `code` with a single back tick
|
||||
|
||||
This is inline ``code`` with double back ticks
|
||||
|
||||
This is inline ```code``` with triple back ticks. This is not standard Markdown but Github supports it and so do we. Actually Github allows an arbitrary number of backs ticks around inline `````codeblocks````` the only constraint is that they should be ```even```` the remainder, in this case the last back tick, should not be highlighted
|
||||
|
||||
The following is a generic block code with a triple tick
|
||||
```
|
||||
code
|
||||
```
|
||||
|
||||
The following is a fenced block code with a triple tick
|
||||
```js
|
||||
var foo = 'bar'
|
||||
```
|
||||
|
||||
A fenced code block must have at least 3 back ticks in the start delimiter but could have more
|
||||
````````ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
```
|
||||
|
||||
A fenced code block must have at least 3 back ticks in the end delimiter but could have more
|
||||
```ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
````````
|
||||
|
||||
A fenced code block could have at most 3 leading spaces in the start delimiter
|
||||
```ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
```
|
||||
|
||||
A fenced code block could have at most 3 leading spaces in the end delimiter
|
||||
```ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
```
|
||||
|
||||
A fenced code block could have at most 3 leading spaces in the start and in the end delimiter
|
||||
```ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
```
|
||||
|
||||
|
||||
this is a code block because it's indented with 4 spaces
|
||||
this should be a continuation
|
||||
|
||||
This line separates two blocks
|
||||
|
||||
this is a code block because it's indented with a \t
|
||||
this should be a continuation
|
||||
|
||||
|
||||
The following is not standard Markdown, officially it's not the Github Flavored Markdown either, it's inspired by the Kramdown Flavored Markdown. Even if not documented Github supports it and so do we
|
||||
|
||||
~~~ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
~~~
|
||||
|
||||
~~~~~~~~ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
~~~
|
||||
|
||||
~~~ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
~~~~~~~~
|
||||
|
||||
~~~ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
~~~
|
||||
|
||||
~~~ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
~~~
|
||||
|
||||
~~~ruby
|
||||
foo = 'bar' if foo.empty?
|
||||
~~~
|
||||
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/codeblocks.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
This is inline <span class="Special">`</span><span class="Constant">code</span><span class="Special">`</span> with a single back tick
|
||||
|
||||
This is inline <span class="Special">``</span><span class="Constant">code</span><span class="Special">``</span> with double back ticks
|
||||
|
||||
This is inline <span class="Special">```</span><span class="Constant">code</span><span class="Special">```</span> with triple back ticks. This is not standard Markdown but Github supports it and so do we. Actually Github allows an arbitrary number of backs ticks around inline <span class="Special">`````</span><span class="Constant">codeblocks</span><span class="Special">`````</span> the only constraint is that they should be <span class="Special">```</span><span class="Constant">even</span><span class="Special">```</span>` the remainder, in this case the last back tick, should not be highlighted
|
||||
|
||||
The following is a generic block code with a triple tick
|
||||
<span class="Special">```</span>
|
||||
<span class="Constant">code</span>
|
||||
<span class="Special">```</span>
|
||||
|
||||
The following is a fenced block code with a triple tick
|
||||
<span class="Special">```js</span>
|
||||
<span class="Constant">var foo = 'bar'</span>
|
||||
<span class="Special">```</span>
|
||||
|
||||
A fenced code block must have at least 3 back ticks in the start delimiter but could have more
|
||||
<span class="Special">````````ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">```</span>
|
||||
|
||||
A fenced code block must have at least 3 back ticks in the end delimiter but could have more
|
||||
<span class="Special">```ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">````````</span>
|
||||
|
||||
A fenced code block could have at most 3 leading spaces in the start delimiter
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">```</span>
|
||||
|
||||
A fenced code block could have at most 3 leading spaces in the end delimiter
|
||||
<span class="Special">```ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
A fenced code block could have at most 3 leading spaces in the start and in the end delimiter
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
|
||||
<span class="Constant"> this is a code block because it's indented with 4 spaces</span>
|
||||
<span class="Constant"> this should be a continuation</span>
|
||||
|
||||
This line separates two blocks
|
||||
|
||||
<span class="Constant"> this is a code block because it's indented with a \t</span>
|
||||
<span class="Constant"> this should be a continuation</span>
|
||||
|
||||
|
||||
The following is not standard Markdown, officially it's not the Github Flavored Markdown either, it's inspired by the Kramdown Flavored Markdown. Even if not documented Github supports it and so do we
|
||||
|
||||
<span class="Special">~~~ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">~~~</span>
|
||||
|
||||
<span class="Special">~~~~~~~~ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">~~~</span>
|
||||
|
||||
<span class="Special">~~~ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">~~~~~~~~</span>
|
||||
|
||||
<span class="Special"> ~~~ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special">~~~</span>
|
||||
|
||||
<span class="Special">~~~ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special"> ~~~</span>
|
||||
|
||||
<span class="Special"> ~~~ruby</span>
|
||||
<span class="Constant">foo = 'bar' if foo.empty?</span>
|
||||
<span class="Special"> ~~~</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
___foo___ must be both highlighted as italic and bold
|
||||
|
||||
***foo*** must be both highlighted as italic and bold
|
||||
|
||||
**_foo_** must be both highlighted as italic and bold
|
||||
|
||||
__*foo*__ must be both highlighted as italic and bold
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/combined_emphasis.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Special { color: #c000c0; }
|
||||
.BoldItalic { font-weight: bold; font-style: italic; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
<span class="Special">___</span><span class="BoldItalic">foo</span><span class="Special">___</span> must be both highlighted as italic and bold
|
||||
|
||||
<span class="Special">***</span><span class="BoldItalic">foo</span><span class="Special">***</span> must be both highlighted as italic and bold
|
||||
|
||||
<span class="Special">**_</span><span class="BoldItalic">foo</span><span class="Special">_**</span> must be both highlighted as italic and bold
|
||||
|
||||
<span class="Special">__*</span><span class="BoldItalic">foo</span><span class="Special">*__</span> must be both highlighted as italic and bold
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# This is an header that _contains_ *weak* highlighed elements
|
||||
|
||||
# This is an header that __contains__ **strong** highlighed elements
|
||||
|
||||
## This is an header that __*contains*__ **_strong_** emphasis elements
|
||||
|
||||
This is also an header that _contains_ *weak* highlighed elements
|
||||
=================================================================
|
||||
|
||||
This is an header that __contains__ **strong** highlighed elements
|
||||
------------------------------------------------------------------
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/contained_emphasis.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Title { color: #c000c0; }
|
||||
.Italic { font-style: italic; }
|
||||
.Special { color: #c000c0; }
|
||||
.BoldItalic { font-weight: bold; font-style: italic; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> This is an header that </span><span class="Special">_</span><span class="Italic">contains</span><span class="Special">_</span><span class="Title"> </span><span class="Special">*</span><span class="Italic">weak</span><span class="Special">*</span><span class="Title"> highlighed elements</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> This is an header that </span><span class="Special">__</span><span class="Bold">contains</span><span class="Special">__</span><span class="Title"> </span><span class="Special">**</span><span class="Bold">strong</span><span class="Special">**</span><span class="Title"> highlighed elements</span>
|
||||
|
||||
<span class="Special">##</span><span class="Title"> This is an header that </span><span class="Special">__*</span><span class="BoldItalic">contains</span><span class="Special">*__</span><span class="Title"> </span><span class="Special">**_</span><span class="BoldItalic">strong</span><span class="Special">_**</span><span class="Title"> emphasis elements</span>
|
||||
|
||||
<span class="Title">This is also an header that </span><span class="Special">_</span><span class="Italic">contains</span><span class="Special">_</span><span class="Title"> </span><span class="Special">*</span><span class="Italic">weak</span><span class="Special">*</span><span class="Title"> highlighed elements</span>
|
||||
<span class="Special">=================================================================</span>
|
||||
|
||||
<span class="Title">This is an header that </span><span class="Special">__</span><span class="Bold">contains</span><span class="Special">__</span><span class="Title"> </span><span class="Special">**</span><span class="Bold">strong</span><span class="Special">**</span><span class="Title"> highlighed elements</span>
|
||||
<span class="Special">------------------------------------------------------------------</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,35 @@
|
||||
# One
|
||||
|
||||
## Two
|
||||
|
||||
### Three
|
||||
|
||||
#### Four
|
||||
|
||||
##### Five
|
||||
|
||||
###### Six
|
||||
|
||||
# One with closing hash #
|
||||
|
||||
## Two with closing hash #
|
||||
|
||||
### Three with closing hash #
|
||||
|
||||
#### Four with closing hash #
|
||||
|
||||
##### Five with closing hash #
|
||||
|
||||
###### Six with closing hash #
|
||||
|
||||
# Can have multiple closing hashes #####
|
||||
|
||||
# An hash in the middle # have no special meaning
|
||||
|
||||
# This should not be an header because the hash should be the first character in the line
|
||||
|
||||
This is # not an header, this is a normal paragraph and the hash must not be considered a delimiter
|
||||
|
||||
####### Seven hashes is an `H6` that begins with an hash character for Dingus but for Github those are seven hashes, an header must have a mandatory space before any character
|
||||
|
||||
######This is not an header on Github because it lacks the mandatory white space between the hashes (delimiter) and the first character of the header
|
||||
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/headers_atx.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Title { color: #c000c0; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">#</span><span class="Title"> One</span>
|
||||
|
||||
<span class="Special">##</span><span class="Title"> Two</span>
|
||||
|
||||
<span class="Special">###</span><span class="Title"> Three</span>
|
||||
|
||||
<span class="Special">####</span><span class="Title"> Four</span>
|
||||
|
||||
<span class="Special">#####</span><span class="Title"> Five</span>
|
||||
|
||||
<span class="Special">######</span><span class="Title"> Six</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> One with closing hash </span><span class="Special">#</span>
|
||||
|
||||
<span class="Special">##</span><span class="Title"> Two with closing hash </span><span class="Special">#</span>
|
||||
|
||||
<span class="Special">###</span><span class="Title"> Three with closing hash </span><span class="Special">#</span>
|
||||
|
||||
<span class="Special">####</span><span class="Title"> Four with closing hash </span><span class="Special">#</span>
|
||||
|
||||
<span class="Special">#####</span><span class="Title"> Five with closing hash </span><span class="Special">#</span>
|
||||
|
||||
<span class="Special">######</span><span class="Title"> Six with closing hash </span><span class="Special">#</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> Can have multiple closing hashes </span><span class="Special">#####</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> An hash in the middle # have no special meaning</span>
|
||||
|
||||
# This should not be an header because the hash should be the first character in the line
|
||||
|
||||
This is # not an header, this is a normal paragraph and the hash must not be considered a delimiter
|
||||
|
||||
####### Seven hashes is an <span class="Special">`</span><span class="Constant">H6</span><span class="Special">`</span> that begins with an hash character for Dingus but for Github those are seven hashes, an header must have a mandatory space before any character
|
||||
|
||||
######This is not an header on Github because it lacks the mandatory white space between the hashes (delimiter) and the first character of the header
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,24 @@
|
||||
H1 Header
|
||||
=========
|
||||
|
||||
H2 Header
|
||||
---------
|
||||
|
||||
H1 Header, underline could be of any length
|
||||
=
|
||||
|
||||
H2 Header, underline could be of any length
|
||||
-
|
||||
|
||||
H1 Header, underline could be of any length
|
||||
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
|
||||
|
||||
H2 Header, underline could be of any length
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
This is not an header because the underline must begin at the beginnning of the line
|
||||
=
|
||||
|
||||
This is not an header because the underline must begin at the beginnning of the line
|
||||
.=
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/headers_setext.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Title { color: #c000c0; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Title">H1 Header</span>
|
||||
<span class="Special">=========</span>
|
||||
|
||||
<span class="Title">H2 Header</span>
|
||||
<span class="Special">---------</span>
|
||||
|
||||
<span class="Title">H1 Header, underline could be of any length</span>
|
||||
<span class="Special">=</span>
|
||||
|
||||
<span class="Title">H2 Header, underline could be of any length</span>
|
||||
<span class="Special">-</span>
|
||||
|
||||
<span class="Title">H1 Header, underline could be of any length</span>
|
||||
<span class="Special">=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================</span>
|
||||
|
||||
<span class="Title">H2 Header, underline could be of any length</span>
|
||||
<span class="Special">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span>
|
||||
|
||||
This is not an header because the underline must begin at the beginnning of the line
|
||||
=
|
||||
|
||||
This is not an header because the underline must begin at the beginnning of the line
|
||||
.=
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,30 @@
|
||||
The following are all horizontal rules
|
||||
|
||||
***
|
||||
|
||||
---
|
||||
|
||||
___
|
||||
|
||||
*********************
|
||||
|
||||
---------------------
|
||||
|
||||
_____________________
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
_ _ _
|
||||
|
||||
* * *
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
Now a special case
|
||||
|
||||
---
|
||||
The line before is an horizontal rule
|
||||
This is however is a title
|
||||
---
|
||||
@@ -0,0 +1,29 @@
|
||||
<div>
|
||||
This is a <span>block</span> of html
|
||||
</div>
|
||||
|
||||
<!--
|
||||
This is a comment
|
||||
-->
|
||||
|
||||
<a href="http://example.com" title="This is an empty element" />
|
||||
|
||||
<a href="http://example.com"/>
|
||||
|
||||
<br />
|
||||
|
||||
This is normal text
|
||||
|
||||
* XML <i>element</i> in a list item
|
||||
|
||||
# XML <i>element</i> in an header
|
||||
|
||||
<div id="container">
|
||||
XML/HTML could not contain *everything*
|
||||
|
||||
Like code blocks
|
||||
|
||||
* Or
|
||||
* List
|
||||
* Items
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/inline_html.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.NonText { color: #8080ff; }
|
||||
.Title { color: #c000c0; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="NonText"><div></span>
|
||||
<span class="NonText"> This is a <span>block</span> of html</span>
|
||||
<span class="NonText"></div></span>
|
||||
|
||||
<span class="NonText"><!--</span>
|
||||
<span class="NonText"> This is a comment</span>
|
||||
<span class="NonText">--></span>
|
||||
|
||||
<span class="NonText"><a href="<a href="http://example.com">http://example.com</a>" title="This is an empty element" /></span>
|
||||
|
||||
<span class="NonText"><a href="<a href="http://example.com">http://example.com</a>"/></span>
|
||||
|
||||
<span class="NonText"><br /></span>
|
||||
|
||||
This is normal text
|
||||
|
||||
<span class="Special">* </span>XML <span class="NonText"><i>element</i></span> in a list item
|
||||
|
||||
<span class="Special">#</span><span class="Title"> XML </span><span class="NonText"><i>element</i></span><span class="Title"> in an header</span>
|
||||
|
||||
<span class="NonText"><div id="container"></span>
|
||||
<span class="NonText">XML/HTML could not contain *everything*</span>
|
||||
|
||||
<span class="NonText"> Like code blocks</span>
|
||||
|
||||
<span class="NonText">* Or</span>
|
||||
<span class="NonText">* List</span>
|
||||
<span class="NonText">* Items</span>
|
||||
<span class="NonText"></div></span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,61 @@
|
||||
Link [link](http://example.com)
|
||||
|
||||
Link with title [link](http://example.com "Title")
|
||||
|
||||
Link with title surrounded by single quotes [link](http://example.com 'Title')
|
||||
|
||||
Link to a relative path [link](/about)
|
||||
|
||||
Link to an anchor [link](#about)
|
||||
|
||||
Link to an image 
|
||||
|
||||
Link with escaped parenthesis in URL [link](/url\(test\) "Title")
|
||||
|
||||
Link with unescaped parenthesis in URL [link](/url(test) "Title")
|
||||
|
||||
The following is not a link because it's escaped \[link](http://example.com) the URL must be auto linked anyway but the rounded parenthesis must not be highlighted
|
||||
|
||||
Link with escaped closed square bracket in text [text \] link](http://example.com)
|
||||
|
||||
Link with inline element in text [this **is** a link](http://example.com)
|
||||
|
||||
Link with newline in text [text
|
||||
link](http://inline.com)
|
||||
|
||||
Link with multiple newline in text [this
|
||||
is
|
||||
text
|
||||
in
|
||||
link](http://inline.com)
|
||||
|
||||
Link with spaces between text and URL it's ok [link] (http://example.com)
|
||||
|
||||
Link with newline between text and URL it's ok [link]
|
||||
(http://example.com)
|
||||
|
||||
Link with newline between URL and title it's ok [link](http://example.com
|
||||
"Title")
|
||||
|
||||
# This is [link](http://github.com) in a title
|
||||
|
||||
[Link](http://example.com) at beginning of the line. Bug: this was considered as link definition
|
||||
|
||||
|
||||
---
|
||||
The following are not valid links
|
||||
|
||||
|
||||
No more than one newline between text and URL [link]
|
||||
|
||||
(http://example.com)
|
||||
|
||||
|
||||
No more that one newline in text [text
|
||||
|
||||
link](http://example.com)
|
||||
|
||||
|
||||
No more that one newline between URL and title [link](http://example.com
|
||||
|
||||
"Title")
|
||||
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/inline_links.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Underlined { color: #c000c0; text-decoration: underline; }
|
||||
.Title { color: #c000c0; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Special { color: #c000c0; }
|
||||
.Identifier { color: #008080; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
Link <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with title <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Bold"> "Title"</span><span class="Special">)</span>
|
||||
|
||||
Link with title surrounded by single quotes <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Bold"> 'Title'</span><span class="Special">)</span>
|
||||
|
||||
Link to a relative path <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined">/about</span><span class="Special">)</span>
|
||||
|
||||
Link to an anchor <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined">#about</span><span class="Special">)</span>
|
||||
|
||||
Link to an image <span class="Special">![</span><span class="Underlined">image</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined">path/to/image.png</span><span class="Special">)</span>
|
||||
|
||||
Link with escaped parenthesis in URL <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined">/url\(test\)</span><span class="Bold"> "Title"</span><span class="Special">)</span>
|
||||
|
||||
Link with unescaped parenthesis in URL <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined">/url(test)</span><span class="Bold"> "Title"</span><span class="Special">)</span>
|
||||
|
||||
The following is not a link because it's escaped \[link](<span class="Underlined"><a href="http://example.com">http://example.com</a></span>) the URL must be auto linked anyway but the rounded parenthesis must not be highlighted
|
||||
|
||||
Link with escaped closed square bracket in text <span class="Special">[</span><span class="Underlined">text \] link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with inline element in text <span class="Special">[</span><span class="Underlined">this </span><span class="Special">**</span><span class="Bold">is</span><span class="Special">**</span><span class="Underlined"> a link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with newline in text <span class="Special">[</span><span class="Underlined">text</span>
|
||||
<span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://inline.com">http://inline.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with multiple newline in text <span class="Special">[</span><span class="Underlined">this</span>
|
||||
<span class="Underlined">is</span>
|
||||
<span class="Underlined">text</span>
|
||||
<span class="Underlined">in</span>
|
||||
<span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://inline.com">http://inline.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with spaces between text and URL it's ok <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span> <span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with newline between text and URL it's ok <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span>
|
||||
<span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Special">)</span>
|
||||
|
||||
Link with newline between URL and title it's ok <span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span>
|
||||
<span class="Bold">"Title"</span><span class="Special">)</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> This is </span><span class="Special">[</span><span class="Underlined">link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://github.com">http://github.com</a></span><span class="Special">)</span><span class="Title"> in a title</span>
|
||||
|
||||
<span class="Special">[</span><span class="Underlined">Link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://example.com">http://example.com</a></span><span class="Special">)</span> at beginning of the line. Bug: this was considered as link definition
|
||||
|
||||
|
||||
<span class="Identifier">---</span>
|
||||
The following are not valid links
|
||||
|
||||
|
||||
No more than one newline between text and URL [link]
|
||||
|
||||
(<span class="Underlined"><a href="http://example.com">http://example.com</a></span>)
|
||||
|
||||
|
||||
No more that one newline in text [text
|
||||
|
||||
link](<span class="Underlined"><a href="http://example.com">http://example.com</a></span>)
|
||||
|
||||
|
||||
No more that one newline between URL and title [link](<span class="Underlined"><a href="http://example.com">http://example.com</a></span>
|
||||
|
||||
"Title")
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,52 @@
|
||||
Reference [bar] [1]
|
||||
|
||||
Reference [bar][1]
|
||||
|
||||
Reference [bar]
|
||||
[1]
|
||||
|
||||
[1]: /url/ "Title"
|
||||
|
||||
|
||||
With [embedded [brackets]][b]
|
||||
With quoted [embedded \[brackets\]][b]
|
||||
With quoted [embedded \[ brackets][b]
|
||||
With quoted [embedded \] brackets][b]
|
||||
|
||||
[b]: /url/
|
||||
|
||||
Indented [once][] times
|
||||
Indented [twice][] times
|
||||
Indented [thrice][] times
|
||||
Indented [four][] times must not a reference, must be a code block
|
||||
|
||||
[once]: /url
|
||||
[twice]: /url
|
||||
[thrice]: /url
|
||||
[four]: /url
|
||||
|
||||
With [angle brackets][]
|
||||
And [without][]
|
||||
|
||||
[angle brackets]: <http://example.com/> "Angle Brackets"
|
||||
[without]: http://example.com/ "Without angle brackets."
|
||||
|
||||
With [line
|
||||
breaks][]
|
||||
|
||||
[line breaks]: http://example.com "Yes this works"
|
||||
|
||||
---
|
||||
The following should be supported but they are not... In GFM and Kramdown link references could omit the second pair of square brackets, with a programming language is possible to check if something between square brackets has a related link definition an so to be interpreted as link reference but here it would be impossible
|
||||
|
||||
[short ref]
|
||||
|
||||
[short
|
||||
ref]
|
||||
|
||||
[short ref]: http://example.com "No more hanging empty bracket!"
|
||||
|
||||
[a ref]
|
||||
|
||||
[a ref]: http://example.com
|
||||
"Title on next line."
|
||||
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/inline_references.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.NonText { color: #8080ff; }
|
||||
.Underlined { color: #c000c0; text-decoration: underline; }
|
||||
.Special { color: #c000c0; }
|
||||
.Identifier { color: #008080; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
Reference <span class="Special">[</span><span class="Underlined">bar</span><span class="Special">]</span> <span class="Special">[</span><span class="Underlined">1</span><span class="Special">]</span>
|
||||
|
||||
Reference <span class="Special">[</span><span class="Underlined">bar</span><span class="Special">][</span><span class="Underlined">1</span><span class="Special">]</span>
|
||||
|
||||
Reference <span class="Special">[</span><span class="Underlined">bar</span><span class="Special">]</span>
|
||||
<span class="Special">[</span><span class="Underlined">1</span><span class="Special">]</span>
|
||||
|
||||
<span class="NonText">[1]: /url/ "Title"</span>
|
||||
|
||||
|
||||
With <span class="Special">[</span><span class="Underlined">embedded [brackets]</span><span class="Special">][</span><span class="Underlined">b</span><span class="Special">]</span>
|
||||
With quoted <span class="Special">[</span><span class="Underlined">embedded \[brackets\]</span><span class="Special">][</span><span class="Underlined">b</span><span class="Special">]</span>
|
||||
With quoted <span class="Special">[</span><span class="Underlined">embedded \[ brackets</span><span class="Special">][</span><span class="Underlined">b</span><span class="Special">]</span>
|
||||
With quoted <span class="Special">[</span><span class="Underlined">embedded \] brackets</span><span class="Special">][</span><span class="Underlined">b</span><span class="Special">]</span>
|
||||
|
||||
<span class="NonText">[b]: /url/</span>
|
||||
|
||||
Indented <span class="Special">[</span><span class="Underlined">once</span><span class="Special">][]</span> times
|
||||
Indented <span class="Special">[</span><span class="Underlined">twice</span><span class="Special">][]</span> times
|
||||
Indented <span class="Special">[</span><span class="Underlined">thrice</span><span class="Special">][]</span> times
|
||||
Indented <span class="Special">[</span><span class="Underlined">four</span><span class="Special">][]</span> times must not a reference, must be a code block
|
||||
|
||||
<span class="NonText"> [once]: /url</span>
|
||||
<span class="NonText"> [twice]: /url</span>
|
||||
<span class="NonText"> [thrice]: /url</span>
|
||||
<span class="NonText"> [four]: /url</span>
|
||||
|
||||
With <span class="Special">[</span><span class="Underlined">angle brackets</span><span class="Special">][]</span>
|
||||
And <span class="Special">[</span><span class="Underlined">without</span><span class="Special">][]</span>
|
||||
|
||||
<span class="NonText">[angle brackets]: <<a href="http://example.com/">http://example.com/</a>> "Angle Brackets"</span>
|
||||
<span class="NonText">[without]: <a href="http://example.com/">http://example.com/</a> "Without angle brackets."</span>
|
||||
|
||||
With <span class="Special">[</span><span class="Underlined">line</span>
|
||||
<span class="Underlined">breaks</span><span class="Special">][]</span>
|
||||
|
||||
<span class="NonText">[line breaks]: <a href="http://example.com">http://example.com</a> "Yes this works"</span>
|
||||
|
||||
<span class="Identifier">---</span>
|
||||
The following should be supported but they are not... In GFM and Kramdown link references could omit the second pair of square brackets, with a programming language is possible to check if something between square brackets has a related link definition an so to be interpreted as link reference but here it would be impossible
|
||||
|
||||
[short ref]
|
||||
|
||||
[short
|
||||
ref]
|
||||
|
||||
<span class="NonText">[short ref]: <a href="http://example.com">http://example.com</a> "No more hanging empty bracket!"</span>
|
||||
|
||||
[a ref]
|
||||
|
||||
<span class="NonText">[a ref]: <a href="http://example.com">http://example.com</a></span>
|
||||
<span class="NonText"> "Title on next line."</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
32
.vim/pack/plugins/start/vim-markdown/spec/features/jekyll.md
Normal file
32
.vim/pack/plugins/start/vim-markdown/spec/features/jekyll.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
layout: post
|
||||
title: Blogging Like a Hacker
|
||||
---
|
||||
|
||||
{% include footer.html %}
|
||||
|
||||
This is a Jekyll output tag {{ post.title }}
|
||||
|
||||
The following are Jekyll output tag with escape
|
||||
|
||||
{{ "{{" }} {{ "{%" }} {{ "}}" }} {{ "%}" }}
|
||||
|
||||
{{ "{%" }} this %}
|
||||
|
||||
{{ "{{" }} this }}
|
||||
|
||||
{{ "{{" }} {{ '"{%"' }} }} this %}
|
||||
|
||||
{{ "{{" }} {{ '"{{"' }} }} this }}
|
||||
|
||||
{% comment %}
|
||||
This is a comment
|
||||
{% endcomment %}
|
||||
|
||||
{% raw %}
|
||||
This is a raw
|
||||
{% endraw %}
|
||||
|
||||
{% highlight ruby %}
|
||||
puts "This is some ruby code ;-)"
|
||||
{% endhighlight %}
|
||||
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/jekyll.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.NonText { color: #8080ff; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">---</span>
|
||||
<span class="NonText">layout: post</span>
|
||||
<span class="NonText">title: Blogging Like a Hacker</span>
|
||||
<span class="Special">---</span>
|
||||
|
||||
<span class="Special">{%</span><span class="NonText"> include footer.html </span><span class="Special">%}</span>
|
||||
|
||||
This is a Jekyll output tag <span class="Special">{{</span><span class="NonText"> post.title </span><span class="Special">}}</span>
|
||||
|
||||
The following are Jekyll output tag with escape
|
||||
|
||||
<span class="Special">{{</span><span class="NonText"> "{{" </span><span class="Special">}}</span> <span class="Special">{{</span><span class="NonText"> "{%" </span><span class="Special">}}</span> <span class="Special">{{</span><span class="NonText"> "}}" </span><span class="Special">}}</span> <span class="Special">{{</span><span class="NonText"> "%}" </span><span class="Special">}}</span>
|
||||
|
||||
<span class="Special">{{</span><span class="NonText"> "{%" </span><span class="Special">}}</span> this %}
|
||||
|
||||
<span class="Special">{{</span><span class="NonText"> "{{" </span><span class="Special">}}</span> this }}
|
||||
|
||||
<span class="Special">{{</span><span class="NonText"> "{{" </span><span class="Special">}}</span> <span class="Special">{{</span><span class="NonText"> '"{%"' </span><span class="Special">}}</span> }} this %}
|
||||
|
||||
<span class="Special">{{</span><span class="NonText"> "{{" </span><span class="Special">}}</span> <span class="Special">{{</span><span class="NonText"> '"{{"' </span><span class="Special">}}</span> }} this }}
|
||||
|
||||
<span class="Special">{% comment %}</span>
|
||||
<span class="NonText">This is a comment</span>
|
||||
<span class="Special">{% endcomment %}</span>
|
||||
|
||||
<span class="Special">{% raw %}</span>
|
||||
<span class="NonText">This is a raw</span>
|
||||
<span class="Special">{% endraw %}</span>
|
||||
|
||||
<span class="Special">{% highlight ruby %}</span>
|
||||
<span class="NonText">puts "This is some ruby code ;-)"</span>
|
||||
<span class="Special">{% endhighlight %}</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,21 @@
|
||||
Hello {#id-1}
|
||||
-----
|
||||
|
||||
Hello {#id-2}
|
||||
=====
|
||||
|
||||
# Header With Identifier {#id-3}
|
||||
|
||||
# Header With Trailing Hashes and Identifier # {#id-4}
|
||||
|
||||
# Trailing Hashes could be as many as you want ####### {#id-5}
|
||||
|
||||
# Header With Hashes # In Text and Identifier {#id-6}
|
||||
|
||||
The following should a level 1 header with a `#` character for content
|
||||
|
||||
##
|
||||
|
||||
The following should a level 2 header with a `#` character for content
|
||||
|
||||
###
|
||||
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/kramdown/headers_with_id.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Title { color: #c000c0; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Title">Hello </span><span class="Special">{#id-1}</span>
|
||||
<span class="Special">-----</span>
|
||||
|
||||
<span class="Title">Hello </span><span class="Special">{#id-2}</span>
|
||||
<span class="Special">=====</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> Header With Identifier </span><span class="Special">{#id-3}</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> Header With Trailing Hashes and Identifier </span><span class="Special">#</span> <span class="Special">{#id-4}</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> Trailing Hashes could be as many as you want </span><span class="Special">#######</span> <span class="Special">{#id-5}</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> Header With Hashes # In Text and Identifier </span><span class="Special">{#id-6}</span>
|
||||
|
||||
The following should a level 1 header with a <span class="Special">`</span><span class="Constant">#</span><span class="Special">`</span> character for content
|
||||
|
||||
<span class="Special">#</span><span class="Title">#</span>
|
||||
|
||||
The following should a level 2 header with a <span class="Special">`</span><span class="Constant">#</span><span class="Special">`</span> character for content
|
||||
|
||||
<span class="Special">##</span><span class="Title">#</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
99
.vim/pack/plugins/start/vim-markdown/spec/features/lists.md
Normal file
99
.vim/pack/plugins/start/vim-markdown/spec/features/lists.md
Normal file
@@ -0,0 +1,99 @@
|
||||
Stars
|
||||
|
||||
* First item
|
||||
* Second item
|
||||
* Third item
|
||||
|
||||
|
||||
Dashes
|
||||
|
||||
- First item
|
||||
- Second item
|
||||
- Third item
|
||||
|
||||
|
||||
Pluses
|
||||
|
||||
+ First item
|
||||
+ Second item
|
||||
+ Third item
|
||||
|
||||
Ordered
|
||||
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
10. Index with more than one digit item
|
||||
11. Index with more than one digit item
|
||||
12. Index with more than one digit item
|
||||
|
||||
Nesting
|
||||
|
||||
* First item first level
|
||||
* Second item second level
|
||||
* Third item third level
|
||||
* Fourth item third level
|
||||
1. First item of the fourth level
|
||||
2. Second item of the fourth level
|
||||
|
||||
List items on multiple lines
|
||||
|
||||
* This is the first item in the list
|
||||
this is still the first item even if it's the second line
|
||||
* This is the second item in the list
|
||||
this is still the second item even if it's the second line
|
||||
this is still the second item even if it's the third line
|
||||
|
||||
This is not part of the above list
|
||||
|
||||
|
||||
List items on multiple lines aligned
|
||||
|
||||
* This is the first item in the list
|
||||
this is still the first item even if it's the second line
|
||||
* This is the second item in the list
|
||||
this is still the second item even if it's the second line
|
||||
this is still the second item even if it's the third line
|
||||
|
||||
This is still the second item even if it's separated with a newline
|
||||
|
||||
This is not part of the above list
|
||||
|
||||
|
||||
Leading space are not allowed, well technically they are… in Dingus (the official markdown engine) leading spaces (up to 3) are allowed in list items but I chose to not allow it because it could lead to nasty situations like the following
|
||||
|
||||
* On Dingus this is a first level list item
|
||||
* But this is a second level list item, even if its indentation it's lower than the line before… looking at the text don't tell me this is not confusing
|
||||
|
||||
A single list delimiter followed by a newline is not a list item
|
||||
|
||||
*
|
||||
|
||||
A single list delimiter followed by a single space and a newline is a list item
|
||||
|
||||
*
|
||||
|
||||
|
||||
List with inline elements
|
||||
|
||||
* List item _ending_
|
||||
with _emphasis_.
|
||||
|
||||
* List item with **strong emphasis**.
|
||||
|
||||
* List item with [a link](http://google.com).
|
||||
|
||||
* List items can have *inline content
|
||||
that spans multiple lines*
|
||||
|
||||
*this is not a list item but a weak emphasis element beginning at the beginning of the line*
|
||||
|
||||
* This is a list item that ends with an asterisk *
|
||||
|
||||
Everything that immediately follows a list item is still part of the list item and a list item could not contain (at least for Github but not for the original Dingus interpreter) block elements like headers if not preceded by a new line
|
||||
|
||||
* This is a list item
|
||||
# This is not an header, is the continuation of the previous list item, an empty line is needed to terminate a list item
|
||||
|
||||
# This is an header
|
||||
134
.vim/pack/plugins/start/vim-markdown/spec/features/lists.md.html
Normal file
134
.vim/pack/plugins/start/vim-markdown/spec/features/lists.md.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Underlined { color: #c000c0; text-decoration: underline; }
|
||||
.Title { color: #c000c0; }
|
||||
.Italic { font-style: italic; }
|
||||
.Special { color: #c000c0; }
|
||||
.Bold { font-weight: bold; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
Stars
|
||||
|
||||
<span class="Special">* </span>First item
|
||||
<span class="Special">* </span>Second item
|
||||
<span class="Special">* </span>Third item
|
||||
|
||||
|
||||
Dashes
|
||||
|
||||
<span class="Special">- </span>First item
|
||||
<span class="Special">- </span>Second item
|
||||
<span class="Special">- </span>Third item
|
||||
|
||||
|
||||
Pluses
|
||||
|
||||
<span class="Special">+ </span>First item
|
||||
<span class="Special">+ </span>Second item
|
||||
<span class="Special">+ </span>Third item
|
||||
|
||||
Ordered
|
||||
|
||||
<span class="Special">1. </span>First item
|
||||
<span class="Special">2. </span>Second item
|
||||
<span class="Special">3. </span>Third item
|
||||
|
||||
<span class="Special">10. </span>Index with more than one digit item
|
||||
<span class="Special">11. </span>Index with more than one digit item
|
||||
<span class="Special">12. </span>Index with more than one digit item
|
||||
|
||||
Nesting
|
||||
|
||||
<span class="Special">* </span>First item first level
|
||||
<span class="Special"> * </span>Second item second level
|
||||
<span class="Special"> * </span>Third item third level
|
||||
<span class="Special"> * </span>Fourth item third level
|
||||
<span class="Special"> 1. </span>First item of the fourth level
|
||||
<span class="Special"> 2. </span>Second item of the fourth level
|
||||
|
||||
List items on multiple lines
|
||||
|
||||
<span class="Special">* </span>This is the first item in the list
|
||||
this is still the first item even if it's the second line
|
||||
<span class="Special">* </span>This is the second item in the list
|
||||
this is still the second item even if it's the second line
|
||||
this is still the second item even if it's the third line
|
||||
|
||||
This is not part of the above list
|
||||
|
||||
|
||||
List items on multiple lines aligned
|
||||
|
||||
<span class="Special">* </span>This is the first item in the list
|
||||
this is still the first item even if it's the second line
|
||||
<span class="Special">* </span>This is the second item in the list
|
||||
this is still the second item even if it's the second line
|
||||
this is still the second item even if it's the third line
|
||||
|
||||
This is still the second item even if it's separated with a newline
|
||||
|
||||
This is not part of the above list
|
||||
|
||||
|
||||
Leading space are not allowed, well technically they are… in Dingus (the official markdown engine) leading spaces (up to 3) are allowed in list items but I chose to not allow it because it could lead to nasty situations like the following
|
||||
|
||||
* On Dingus this is a first level list item
|
||||
* But this is a second level list item, even if its indentation it's lower than the line before… looking at the text don't tell me this is not confusing
|
||||
|
||||
A single list delimiter followed by a newline is not a list item
|
||||
|
||||
*
|
||||
|
||||
A single list delimiter followed by a single space and a newline is a list item
|
||||
|
||||
*
|
||||
|
||||
|
||||
List with inline elements
|
||||
|
||||
<span class="Special">* </span>List item <span class="Special">_</span><span class="Italic">ending</span><span class="Special">_</span>
|
||||
with <span class="Special">_</span><span class="Italic">emphasis</span><span class="Special">_</span>.
|
||||
|
||||
<span class="Special">* </span>List item with <span class="Special">**</span><span class="Bold">strong emphasis</span><span class="Special">**</span>.
|
||||
|
||||
<span class="Special">* </span>List item with <span class="Special">[</span><span class="Underlined">a link</span><span class="Special">]</span><span class="Special">(</span><span class="Underlined"><a href="http://google.com">http://google.com</a></span><span class="Special">)</span>.
|
||||
|
||||
<span class="Special">* </span>List items can have <span class="Special">*</span><span class="Italic">inline content</span>
|
||||
<span class="Italic"> that spans multiple lines</span><span class="Special">*</span>
|
||||
|
||||
<span class="Special">*</span><span class="Italic">this is not a list item but a weak emphasis element beginning at the beginning of the line</span><span class="Special">*</span>
|
||||
|
||||
<span class="Special">* </span>This is a list item that ends with an asterisk *
|
||||
|
||||
Everything that immediately follows a list item is still part of the list item and a list item could not contain (at least for Github but not for the original Dingus interpreter) block elements like headers if not preceded by a new line
|
||||
|
||||
<span class="Special">* </span>This is a list item
|
||||
# This is not an header, is the continuation of the previous list item, an empty line is needed to terminate a list item
|
||||
|
||||
<span class="Special">#</span><span class="Title"> This is an header</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
* First level, first item
|
||||
|
||||
# Header 1 in Level 1
|
||||
|
||||
## Header 2 in Level 1
|
||||
|
||||
### Header 3 in Level 1
|
||||
|
||||
#### Header 4 in Level 1
|
||||
|
||||
##### Header 5 in Level 1
|
||||
|
||||
###### Header 6 in Level 1
|
||||
|
||||
Hello
|
||||
===
|
||||
|
||||
* Level 2 list item
|
||||
|
||||
# Header 1 in Level 2
|
||||
|
||||
## Header 2 in Level 2
|
||||
|
||||
### Header 3 in Level 2
|
||||
|
||||
#### Header 4 in Level 1
|
||||
|
||||
##### Header 5 in Level 1
|
||||
|
||||
###### Header 6 in Level 1
|
||||
|
||||
|
||||
* First level, first item, the following it's a rule
|
||||
|
||||
***
|
||||
* Second level, first item,, the following it's a rule
|
||||
|
||||
***
|
||||
|
||||
* Third level, first item, the following it's not a rule because the preceding empty line it's mandatory
|
||||
***
|
||||
|
||||
* Third level, second item, the following it's not a rule because it's anchored at the exact indentation
|
||||
|
||||
***
|
||||
|
||||
|
||||
* First level, first item, the following it's blockquote
|
||||
|
||||
> Blockquotes terminates with an empty line
|
||||
|
||||
* Second level, first item,, the following it's a blockquote
|
||||
|
||||
> Blockquotes terminates with an empty line
|
||||
|
||||
* Third level, first item, the following it's not a blockquote because the preceding empty line it's mandatory
|
||||
> Blockquotes terminates with an empty line
|
||||
|
||||
* Third level, second item, the following it's not a rule because it's anchored at the exact indentation
|
||||
|
||||
> Blockquotes terminates with an empty line
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists_with_anchored_elements.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Comment { color: #0000c0; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
|
||||
# Header 1 in Level 1
|
||||
|
||||
## Header 2 in Level 1
|
||||
|
||||
### Header 3 in Level 1
|
||||
|
||||
#### Header 4 in Level 1
|
||||
|
||||
##### Header 5 in Level 1
|
||||
|
||||
###### Header 6 in Level 1
|
||||
|
||||
Hello
|
||||
===
|
||||
|
||||
<span class="Special"> * </span>Level 2 list item
|
||||
|
||||
# Header 1 in Level 2
|
||||
|
||||
## Header 2 in Level 2
|
||||
|
||||
### Header 3 in Level 2
|
||||
|
||||
#### Header 4 in Level 1
|
||||
|
||||
##### Header 5 in Level 1
|
||||
|
||||
###### Header 6 in Level 1
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, first item, the following it's a rule
|
||||
|
||||
***
|
||||
<span class="Special"> * </span>Second level, first item,, the following it's a rule
|
||||
|
||||
***
|
||||
|
||||
<span class="Special"> * </span>Third level, first item, the following it's not a rule because the preceding empty line it's mandatory
|
||||
***
|
||||
|
||||
<span class="Special"> * </span>Third level, second item, the following it's not a rule because it's anchored at the exact indentation
|
||||
|
||||
***
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, first item, the following it's blockquote
|
||||
|
||||
<span class="Special"> > </span><span class="Comment">Blockquotes terminates with an empty line</span>
|
||||
|
||||
<span class="Special"> * </span>Second level, first item,, the following it's a blockquote
|
||||
|
||||
<span class="Special"> > </span><span class="Comment">Blockquotes terminates with an empty line</span>
|
||||
|
||||
<span class="Special"> * </span>Third level, first item, the following it's not a blockquote because the preceding empty line it's mandatory
|
||||
> Blockquotes terminates with an empty line
|
||||
|
||||
<span class="Special"> * </span>Third level, second item, the following it's not a rule because it's anchored at the exact indentation
|
||||
|
||||
> Blockquotes terminates with an empty line
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
* this is not an item list this is a code block because it has 4 leading spaces
|
||||
|
||||
* First level, first item
|
||||
|
||||
Code blocks not contained in list items must have at least 4 leading spaces. Code blocks contained in list items must have at least 8 leading spaces for the first level and additional 2 leading spaces per level
|
||||
|
||||
This is a code block contained in a first level list item
|
||||
|
||||
* Second level, first item
|
||||
|
||||
This is not a code block, it could be because it has 8 leading spaces but it's not because it's contained in a second level list item, the following it's a code block because it has 10 leading spaces (8+2*(level-1))
|
||||
|
||||
This is a code block contained in a second level list item
|
||||
|
||||
Now we are back to the first level item so the following code block could be indented with 8 leading spaces
|
||||
|
||||
This is a code block contained in a first level list item
|
||||
|
||||
* Second level, second item
|
||||
* Third level, first item
|
||||
|
||||
This is a code block contained in a third level list item because it has 12 leading spaces (8+2*(level-1))
|
||||
|
||||
* Second level, third item
|
||||
This could be a code block because it has 10 leading spaces but it's not because it's not preceded by a mandatory blank line
|
||||
|
||||
This is a code block because it has 10 leading spaces and it's preceded by a blank line
|
||||
|
||||
|
||||
|
||||
* First level, third item
|
||||
|
||||
This is a code block, not a surprise
|
||||
|
||||
|
||||
This is a code block because two consecutive new lines terminates the list item so 4 leading spaces are enough for a code block
|
||||
|
||||
|
||||
* First level, first item
|
||||
First level, first item
|
||||
* First level, second item
|
||||
First level, second item
|
||||
First level, second item
|
||||
|
||||
First level, second item, a single blank line is not enough to terminate a list item
|
||||
|
||||
So this is not a code block even with 6 leading spaces
|
||||
|
||||
This is code block because 8 leading white spaces are needed as it's contained by a first level list item
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists_with_codeblocks.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
<span class="Constant"> * this is not an item list this is a code block because it has 4 leading spaces</span>
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
|
||||
Code blocks not contained in list items must have at least 4 leading spaces. Code blocks contained in list items must have at least 8 leading spaces for the first level and additional 2 leading spaces per level
|
||||
|
||||
<span class="Constant"> This is a code block contained in a first level list item</span>
|
||||
|
||||
<span class="Special"> * </span>Second level, first item
|
||||
|
||||
This is not a code block, it could be because it has 8 leading spaces but it's not because it's contained in a second level list item, the following it's a code block because it has 10 leading spaces (8+2*(level-1))
|
||||
|
||||
<span class="Constant"> This is a code block contained in a second level list item</span>
|
||||
|
||||
Now we are back to the first level item so the following code block could be indented with 8 leading spaces
|
||||
|
||||
<span class="Constant"> This is a code block contained in a first level list item</span>
|
||||
|
||||
<span class="Special"> * </span>Second level, second item
|
||||
<span class="Special"> * </span>Third level, first item
|
||||
|
||||
<span class="Constant"> This is a code block contained in a third level list item because it has 12 leading spaces (8+2*(level-1))</span>
|
||||
|
||||
<span class="Special"> * </span>Second level, third item
|
||||
This could be a code block because it has 10 leading spaces but it's not because it's not preceded by a mandatory blank line
|
||||
|
||||
<span class="Constant"> This is a code block because it has 10 leading spaces and it's preceded by a blank line</span>
|
||||
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, third item
|
||||
|
||||
<span class="Constant"> This is a code block, not a surprise</span>
|
||||
|
||||
|
||||
<span class="Constant"> This is a code block because two consecutive new lines terminates the list item so 4 leading spaces are enough for a code block</span>
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
First level, first item
|
||||
<span class="Special">* </span>First level, second item
|
||||
First level, second item
|
||||
First level, second item
|
||||
|
||||
First level, second item, a single blank line is not enough to terminate a list item
|
||||
|
||||
So this is not a code block even with 6 leading spaces
|
||||
|
||||
<span class="Constant"> This is code block because 8 leading white spaces are needed as it's contained by a first level list item</span>
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,54 @@
|
||||
```ruby
|
||||
# This is a fenced code block
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
```ruby
|
||||
# This is not a fenced code block but a code block
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
* First level, first item
|
||||
First level, first item with `inline` element ``foo`` ``foo``
|
||||
|
||||
Still first level, first item, the following it's not a fenced code block but an inline code block
|
||||
```ruby
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
Still first level, first item, the following it's a fenced code block because it's preceded by an empty line
|
||||
|
||||
```ruby
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
|
||||
* First level, first item
|
||||
* Second level, first item
|
||||
* Third level, first item
|
||||
* Fourth level, first item
|
||||
|
||||
```ruby
|
||||
# This is a fenced code block and not a code block even it has 8 leading spaces because it's contained in a fourth level list item
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
|
||||
* First level, first item
|
||||
|
||||
```ruby
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
```ruby
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
```ruby
|
||||
def ruby; end
|
||||
```
|
||||
|
||||
```ruby
|
||||
# This is not a fenced code block because it has 8 leading white spaces and so it's a code block
|
||||
def ruby; end
|
||||
```
|
||||
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists_with_fenced_codeblocks.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">```ruby</span>
|
||||
<span class="Constant"># This is a fenced code block</span>
|
||||
<span class="Constant">def ruby; end</span>
|
||||
<span class="Special">```</span>
|
||||
|
||||
<span class="Constant"> ```ruby</span>
|
||||
<span class="Constant"> # This is not a fenced code block but a code block</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Constant"> ```</span>
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
First level, first item with <span class="Special">`</span><span class="Constant">inline</span><span class="Special">`</span> element <span class="Special">``</span><span class="Constant">foo</span><span class="Special">``</span> <span class="Special">``</span><span class="Constant">foo</span><span class="Special">``</span>
|
||||
|
||||
Still first level, first item, the following it's not a fenced code block but an inline code block
|
||||
<span class="Special">```</span><span class="Constant">ruby</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Constant"> </span><span class="Special">```</span>
|
||||
|
||||
Still first level, first item, the following it's a fenced code block because it's preceded by an empty line
|
||||
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
<span class="Special"> * </span>Second level, first item
|
||||
<span class="Special"> * </span>Third level, first item
|
||||
<span class="Special"> * </span>Fourth level, first item
|
||||
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant"> # This is a fenced code block and not a code block even it has 8 leading spaces because it's contained in a fourth level list item</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
<span class="Special"> ```ruby</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Special"> ```</span>
|
||||
|
||||
<span class="Constant"> ```ruby</span>
|
||||
<span class="Constant"> # This is not a fenced code block because it has 8 leading white spaces and so it's a code block</span>
|
||||
<span class="Constant"> def ruby; end</span>
|
||||
<span class="Constant"> ```</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,21 @@
|
||||
* First level, first item
|
||||
* Second level, first item
|
||||
* Third level, first item
|
||||
still on the third level, first item
|
||||
|
||||
Back to the second level, first item, yes, the indentation it's the same as the last non blank line but this it's preceded with a blank line so it's not considered a continuation of the list item but another element ans since it's less indented than the list item it's not contained in it but in it's parent
|
||||
|
||||
Back to the first level, first item
|
||||
* Second level, second item
|
||||
|
||||
Still on the third level, first item because the indentation is right for the third level
|
||||
|
||||
* First level, first item
|
||||
* Second level, first item
|
||||
* Third level, first item
|
||||
* Fourth level, first item
|
||||
this is still the fourth level, it's a continuation of the first line no matter what, a blank line it's needed to end the list item
|
||||
|
||||
|
||||
* First level, first item
|
||||
* A third level could not be contained in a first level, again this is technically supported but I choose to not allow it both for the sake of simplicity and to avoid confusing situation: this would be considered not a third level but a second level with leading spaces until a certain point, after that it's considered as a continuation of the first item… as I said, confusing better to stick to simple and consistent rules
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists_with_lists.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">* </span>First level, first item
|
||||
<span class="Special"> * </span>Second level, first item
|
||||
<span class="Special"> * </span>Third level, first item
|
||||
still on the third level, first item
|
||||
|
||||
Back to the second level, first item, yes, the indentation it's the same as the last non blank line but this it's preceded with a blank line so it's not considered a continuation of the list item but another element ans since it's less indented than the list item it's not contained in it but in it's parent
|
||||
|
||||
Back to the first level, first item
|
||||
<span class="Special"> * </span>Second level, second item
|
||||
|
||||
Still on the third level, first item because the indentation is right for the third level
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
<span class="Special"> * </span>Second level, first item
|
||||
<span class="Special"> * </span>Third level, first item
|
||||
<span class="Special"> * </span>Fourth level, first item
|
||||
this is still the fourth level, it's a continuation of the first line no matter what, a blank line it's needed to end the list item
|
||||
|
||||
|
||||
<span class="Special">* </span>First level, first item
|
||||
* A third level could not be contained in a first level, again this is technically supported but I choose to not allow it both for the sake of simplicity and to avoid confusing situation: this would be considered not a third level but a second level with leading spaces until a certain point, after that it's considered as a continuation of the first item… as I said, confusing better to stick to simple and consistent rules
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,36 @@
|
||||
* First level, first item with table
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
* Second level, first item with table
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
Row-2-Column-1|Row-2-Column-2
|
||||
Row-3-Column-1|Row-3-Column-2
|
||||
Row-4-Column-1|Row-4-Column-2
|
||||
|
||||
* Second level, second item with table, it's not a code block, tables could have as many leading spaces as wanted
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
Row-2-Column-1|Row-2-Column-2
|
||||
Row-3-Column-1|Row-3-Column-2
|
||||
Row-4-Column-1|Row-4-Column-2
|
||||
|
||||
* Third level, first item
|
||||
* Fourth level, first item
|
||||
* Fifth level, first item
|
||||
|
||||
The following it's a table in the third level list item
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists_with_tables.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">* </span>First level, first item with table
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
|
||||
<span class="Special"> * </span>Second level, first item with table
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
Row-2-Column-1<span class="Special">|</span>Row-2-Column-2
|
||||
Row-3-Column-1<span class="Special">|</span>Row-3-Column-2
|
||||
Row-4-Column-1<span class="Special">|</span>Row-4-Column-2
|
||||
|
||||
<span class="Special"> * </span>Second level, second item with table, it's not a code block, tables could have as many leading spaces as wanted
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
Row-2-Column-1<span class="Special">|</span>Row-2-Column-2
|
||||
Row-3-Column-1<span class="Special">|</span>Row-3-Column-2
|
||||
Row-4-Column-1<span class="Special">|</span>Row-4-Column-2
|
||||
|
||||
<span class="Special"> * </span>Third level, first item
|
||||
<span class="Special"> * </span>Fourth level, first item
|
||||
<span class="Special"> * </span>Fifth level, first item
|
||||
|
||||
The following it's a table in the third level list item
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,29 @@
|
||||
Stars
|
||||
* [ ] First tasks item
|
||||
* [x] Second tasks item
|
||||
* [ ] Third tasks item
|
||||
|
||||
|
||||
Dashes
|
||||
- [x] First tasks item
|
||||
- [ ] Second tasks item
|
||||
- [x] Third tasks item
|
||||
|
||||
|
||||
Pluses
|
||||
+ [x] First tasks item
|
||||
+ [x] Second tasks item
|
||||
+ [ ] Third tasks item
|
||||
|
||||
|
||||
Ordered
|
||||
1. [ ] First tasks item
|
||||
2. [x] Second tasks item
|
||||
3. [x] Third tasks item
|
||||
|
||||
* [] This is not a task list item because the space between the brackets is mandatory for a non completed task
|
||||
* [*] This is not a task list item because the `x` is the only allowed character to mark a task as done
|
||||
* [ ]This is not a task list item because the space after the brackets is mandatory
|
||||
* [x]This is not a task list item because the space after the brackets is mandatory
|
||||
|
||||
Aside from that task lists behaves in the same way as the simple lists
|
||||
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/lists_with_tasks.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
Stars
|
||||
<span class="Special">* [ ] </span>First tasks item
|
||||
<span class="Special">* [x] </span>Second tasks item
|
||||
<span class="Special">* [ ] </span>Third tasks item
|
||||
|
||||
|
||||
Dashes
|
||||
<span class="Special">- [x] </span>First tasks item
|
||||
<span class="Special">- [ ] </span>Second tasks item
|
||||
<span class="Special">- [x] </span>Third tasks item
|
||||
|
||||
|
||||
Pluses
|
||||
<span class="Special">+ [x] </span>First tasks item
|
||||
<span class="Special">+ [x] </span>Second tasks item
|
||||
<span class="Special">+ [ ] </span>Third tasks item
|
||||
|
||||
|
||||
Ordered
|
||||
<span class="Special">1. [ ] </span>First tasks item
|
||||
<span class="Special">2. [x] </span>Second tasks item
|
||||
<span class="Special">3. [x] </span>Third tasks item
|
||||
|
||||
<span class="Special">* </span>[] This is not a task list item because the space between the brackets is mandatory for a non completed task
|
||||
<span class="Special">* </span>[*] This is not a task list item because the <span class="Special">`</span><span class="Constant">x</span><span class="Special">`</span> is the only allowed character to mark a task as done
|
||||
<span class="Special">* </span>[ ]This is not a task list item because the space after the brackets is mandatory
|
||||
<span class="Special">* </span>[x]This is not a task list item because the space after the brackets is mandatory
|
||||
|
||||
Aside from that task lists behaves in the same way as the simple lists
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,896 @@
|
||||
Markdown: Syntax
|
||||
================
|
||||
|
||||
<ul id="ProjectSubmenu">
|
||||
<li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
|
||||
<li><a href="/projects/markdown/basics" title="Markdown Basics">Basics</a></li>
|
||||
<li><a class="selected" title="Markdown Syntax Documentation">Syntax</a></li>
|
||||
<li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
|
||||
<li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
* [Overview](#overview)
|
||||
* [Philosophy](#philosophy)
|
||||
* [Inline HTML](#html)
|
||||
* [Automatic Escaping for Special Characters](#autoescape)
|
||||
* [Block Elements](#block)
|
||||
* [Paragraphs and Line Breaks](#p)
|
||||
* [Headers](#header)
|
||||
* [Blockquotes](#blockquote)
|
||||
* [Lists](#list)
|
||||
* [Code Blocks](#precode)
|
||||
* [Horizontal Rules](#hr)
|
||||
* [Span Elements](#span)
|
||||
* [Links](#link)
|
||||
* [Emphasis](#em)
|
||||
* [Code](#code)
|
||||
* [Images](#img)
|
||||
* [Miscellaneous](#misc)
|
||||
* [Backslash Escapes](#backslash)
|
||||
* [Automatic Links](#autolink)
|
||||
|
||||
|
||||
**Note:** This document is itself written using Markdown; you
|
||||
can [see the source for it by adding '.text' to the URL][src].
|
||||
|
||||
[src]: /projects/markdown/syntax.text
|
||||
|
||||
* * *
|
||||
|
||||
<h2 id="overview">Overview</h2>
|
||||
|
||||
<h3 id="philosophy">Philosophy</h3>
|
||||
|
||||
Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
|
||||
|
||||
Readability, however, is emphasized above all else. A Markdown-formatted
|
||||
document should be publishable as-is, as plain text, without looking
|
||||
like it's been marked up with tags or formatting instructions. While
|
||||
Markdown's syntax has been influenced by several existing text-to-HTML
|
||||
filters -- including [Setext] [1], [atx] [2], [Textile] [3], [reStructuredText] [4],
|
||||
[Grutatext] [5], and [EtText] [6] -- the single biggest source of
|
||||
inspiration for Markdown's syntax is the format of plain text email.
|
||||
|
||||
[1]: http://docutils.sourceforge.net/mirror/setext.html
|
||||
[2]: http://www.aaronsw.com/2002/atx/
|
||||
[3]: http://textism.com/tools/textile/
|
||||
[4]: http://docutils.sourceforge.net/rst.html
|
||||
[5]: http://www.triptico.com/software/grutatxt.html
|
||||
[6]: http://ettext.taint.org/doc/
|
||||
|
||||
To this end, Markdown's syntax is comprised entirely of punctuation
|
||||
characters, which punctuation characters have been carefully chosen so
|
||||
as to look like what they mean. E.g., asterisks around a word actually
|
||||
look like \*emphasis\*. Markdown lists look like, well, lists. Even
|
||||
blockquotes look like quoted passages of text, assuming you've ever
|
||||
used email.
|
||||
|
||||
|
||||
|
||||
<h3 id="html">Inline HTML</h3>
|
||||
|
||||
Markdown's syntax is intended for one purpose: to be used as a
|
||||
format for *writing* for the web.
|
||||
|
||||
Markdown is not a replacement for HTML, or even close to it. Its
|
||||
syntax is very small, corresponding only to a very small subset of
|
||||
HTML tags. The idea is *not* to create a syntax that makes it easier
|
||||
to insert HTML tags. In my opinion, HTML tags are already easy to
|
||||
insert. The idea for Markdown is to make it easy to read, write, and
|
||||
edit prose. HTML is a *publishing* format; Markdown is a *writing*
|
||||
format. Thus, Markdown's formatting syntax only addresses issues that
|
||||
can be conveyed in plain text.
|
||||
|
||||
For any markup that is not covered by Markdown's syntax, you simply
|
||||
use HTML itself. There's no need to preface it or delimit it to
|
||||
indicate that you're switching from Markdown to HTML; you just use
|
||||
the tags.
|
||||
|
||||
The only restrictions are that block-level HTML elements -- e.g. `<div>`,
|
||||
`<table>`, `<pre>`, `<p>`, etc. -- must be separated from surrounding
|
||||
content by blank lines, and the start and end tags of the block should
|
||||
not be indented with tabs or spaces. Markdown is smart enough not
|
||||
to add extra (unwanted) `<p>` tags around HTML block-level tags.
|
||||
|
||||
For example, to add an HTML table to a Markdown article:
|
||||
|
||||
This is a regular paragraph.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Foo</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
This is another regular paragraph.
|
||||
|
||||
Note that Markdown formatting syntax is not processed within block-level
|
||||
HTML tags. E.g., you can't use Markdown-style `*emphasis*` inside an
|
||||
HTML block.
|
||||
|
||||
Span-level HTML tags -- e.g. `<span>`, `<cite>`, or `<del>` -- can be
|
||||
used anywhere in a Markdown paragraph, list item, or header. If you
|
||||
want, you can even use HTML tags instead of Markdown formatting; e.g. if
|
||||
you'd prefer to use HTML `<a>` or `<img>` tags instead of Markdown's
|
||||
link or image syntax, go right ahead.
|
||||
|
||||
Unlike block-level HTML tags, Markdown syntax *is* processed within
|
||||
span-level tags.
|
||||
|
||||
|
||||
<h3 id="autoescape">Automatic Escaping for Special Characters</h3>
|
||||
|
||||
In HTML, there are two characters that demand special treatment: `<`
|
||||
and `&`. Left angle brackets are used to start tags; ampersands are
|
||||
used to denote HTML entities. If you want to use them as literal
|
||||
characters, you must escape them as entities, e.g. `<`, and
|
||||
`&`.
|
||||
|
||||
Ampersands in particular are bedeviling for web writers. If you want to
|
||||
write about 'AT&T', you need to write '`AT&T`'. You even need to
|
||||
escape ampersands within URLs. Thus, if you want to link to:
|
||||
|
||||
http://images.google.com/images?num=30&q=larry+bird
|
||||
|
||||
you need to encode the URL as:
|
||||
|
||||
http://images.google.com/images?num=30&q=larry+bird
|
||||
|
||||
in your anchor tag `href` attribute. Needless to say, this is easy to
|
||||
forget, and is probably the single most common source of HTML validation
|
||||
errors in otherwise well-marked-up web sites.
|
||||
|
||||
Markdown allows you to use these characters naturally, taking care of
|
||||
all the necessary escaping for you. If you use an ampersand as part of
|
||||
an HTML entity, it remains unchanged; otherwise it will be translated
|
||||
into `&`.
|
||||
|
||||
So, if you want to include a copyright symbol in your article, you can write:
|
||||
|
||||
©
|
||||
|
||||
and Markdown will leave it alone. But if you write:
|
||||
|
||||
AT&T
|
||||
|
||||
Markdown will translate it to:
|
||||
|
||||
AT&T
|
||||
|
||||
Similarly, because Markdown supports [inline HTML](#html), if you use
|
||||
angle brackets as delimiters for HTML tags, Markdown will treat them as
|
||||
such. But if you write:
|
||||
|
||||
4 < 5
|
||||
|
||||
Markdown will translate it to:
|
||||
|
||||
4 < 5
|
||||
|
||||
However, inside Markdown code spans and blocks, angle brackets and
|
||||
ampersands are *always* encoded automatically. This makes it easy to use
|
||||
Markdown to write about HTML code. (As opposed to raw HTML, which is a
|
||||
terrible format for writing about HTML syntax, because every single `<`
|
||||
and `&` in your example code needs to be escaped.)
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
|
||||
<h2 id="block">Block Elements</h2>
|
||||
|
||||
|
||||
<h3 id="p">Paragraphs and Line Breaks</h3>
|
||||
|
||||
A paragraph is simply one or more consecutive lines of text, separated
|
||||
by one or more blank lines. (A blank line is any line that looks like a
|
||||
blank line -- a line containing nothing but spaces or tabs is considered
|
||||
blank.) Normal paragraphs should not be indented with spaces or tabs.
|
||||
|
||||
The implication of the "one or more consecutive lines of text" rule is
|
||||
that Markdown supports "hard-wrapped" text paragraphs. This differs
|
||||
significantly from most other text-to-HTML formatters (including Movable
|
||||
Type's "Convert Line Breaks" option) which translate every line break
|
||||
character in a paragraph into a `<br />` tag.
|
||||
|
||||
When you *do* want to insert a `<br />` break tag using Markdown, you
|
||||
end a line with two or more spaces, then type return.
|
||||
|
||||
Yes, this takes a tad more effort to create a `<br />`, but a simplistic
|
||||
"every line break is a `<br />`" rule wouldn't work for Markdown.
|
||||
Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l]
|
||||
work best -- and look better -- when you format them with hard breaks.
|
||||
|
||||
[bq]: #blockquote
|
||||
[l]: #list
|
||||
|
||||
|
||||
|
||||
<h3 id="header">Headers</h3>
|
||||
|
||||
Markdown supports two styles of headers, [Setext] [1] and [atx] [2].
|
||||
|
||||
Setext-style headers are "underlined" using equal signs (for first-level
|
||||
headers) and dashes (for second-level headers). For example:
|
||||
|
||||
This is an H1
|
||||
=============
|
||||
|
||||
This is an H2
|
||||
-------------
|
||||
|
||||
Any number of underlining `=`'s or `-`'s will work.
|
||||
|
||||
Atx-style headers use 1-6 hash characters at the start of the line,
|
||||
corresponding to header levels 1-6. For example:
|
||||
|
||||
# This is an H1
|
||||
|
||||
## This is an H2
|
||||
|
||||
###### This is an H6
|
||||
|
||||
Optionally, you may "close" atx-style headers. This is purely
|
||||
cosmetic -- you can use this if you think it looks better. The
|
||||
closing hashes don't even need to match the number of hashes
|
||||
used to open the header. (The number of opening hashes
|
||||
determines the header level.) :
|
||||
|
||||
# This is an H1 #
|
||||
|
||||
## This is an H2 ##
|
||||
|
||||
### This is an H3 ######
|
||||
|
||||
|
||||
<h3 id="blockquote">Blockquotes</h3>
|
||||
|
||||
Markdown uses email-style `>` characters for blockquoting. If you're
|
||||
familiar with quoting passages of text in an email message, then you
|
||||
know how to create a blockquote in Markdown. It looks best if you hard
|
||||
wrap the text and put a `>` before every line:
|
||||
|
||||
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
|
||||
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
|
||||
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
|
||||
>
|
||||
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
|
||||
> id sem consectetuer libero luctus adipiscing.
|
||||
|
||||
Markdown allows you to be lazy and only put the `>` before the first
|
||||
line of a hard-wrapped paragraph:
|
||||
|
||||
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
|
||||
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
|
||||
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
|
||||
|
||||
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
|
||||
id sem consectetuer libero luctus adipiscing.
|
||||
|
||||
Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
|
||||
adding additional levels of `>`:
|
||||
|
||||
> This is the first level of quoting.
|
||||
>
|
||||
> > This is nested blockquote.
|
||||
>
|
||||
> Back to the first level.
|
||||
|
||||
Blockquotes can contain other Markdown elements, including headers, lists,
|
||||
and code blocks:
|
||||
|
||||
> ## This is a header.
|
||||
>
|
||||
> 1. This is the first list item.
|
||||
> 2. This is the second list item.
|
||||
>
|
||||
> Here's some example code:
|
||||
>
|
||||
> return shell_exec("echo $input | $markdown_script");
|
||||
|
||||
Any decent text editor should make email-style quoting easy. For
|
||||
example, with BBEdit, you can make a selection and choose Increase
|
||||
Quote Level from the Text menu.
|
||||
|
||||
|
||||
<h3 id="list">Lists</h3>
|
||||
|
||||
Markdown supports ordered (numbered) and unordered (bulleted) lists.
|
||||
|
||||
Unordered lists use asterisks, pluses, and hyphens -- interchangably
|
||||
-- as list markers:
|
||||
|
||||
* Red
|
||||
* Green
|
||||
* Blue
|
||||
|
||||
is equivalent to:
|
||||
|
||||
+ Red
|
||||
+ Green
|
||||
+ Blue
|
||||
|
||||
and:
|
||||
|
||||
- Red
|
||||
- Green
|
||||
- Blue
|
||||
|
||||
Ordered lists use numbers followed by periods:
|
||||
|
||||
1. Bird
|
||||
2. McHale
|
||||
3. Parish
|
||||
|
||||
It's important to note that the actual numbers you use to mark the
|
||||
list have no effect on the HTML output Markdown produces. The HTML
|
||||
Markdown produces from the above list is:
|
||||
|
||||
<ol>
|
||||
<li>Bird</li>
|
||||
<li>McHale</li>
|
||||
<li>Parish</li>
|
||||
</ol>
|
||||
|
||||
If you instead wrote the list in Markdown like this:
|
||||
|
||||
1. Bird
|
||||
1. McHale
|
||||
1. Parish
|
||||
|
||||
or even:
|
||||
|
||||
3. Bird
|
||||
1. McHale
|
||||
8. Parish
|
||||
|
||||
you'd get the exact same HTML output. The point is, if you want to,
|
||||
you can use ordinal numbers in your ordered Markdown lists, so that
|
||||
the numbers in your source match the numbers in your published HTML.
|
||||
But if you want to be lazy, you don't have to.
|
||||
|
||||
If you do use lazy list numbering, however, you should still start the
|
||||
list with the number 1. At some point in the future, Markdown may support
|
||||
starting ordered lists at an arbitrary number.
|
||||
|
||||
List markers typically start at the left margin, but may be indented by
|
||||
up to three spaces. List markers must be followed by one or more spaces
|
||||
or a tab.
|
||||
|
||||
To make lists look nice, you can wrap items with hanging indents:
|
||||
|
||||
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
|
||||
viverra nec, fringilla in, laoreet vitae, risus.
|
||||
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
||||
Suspendisse id sem consectetuer libero luctus adipiscing.
|
||||
|
||||
But if you want to be lazy, you don't have to:
|
||||
|
||||
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
|
||||
viverra nec, fringilla in, laoreet vitae, risus.
|
||||
* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
|
||||
Suspendisse id sem consectetuer libero luctus adipiscing.
|
||||
|
||||
If list items are separated by blank lines, Markdown will wrap the
|
||||
items in `<p>` tags in the HTML output. For example, this input:
|
||||
|
||||
* Bird
|
||||
* Magic
|
||||
|
||||
will turn into:
|
||||
|
||||
<ul>
|
||||
<li>Bird</li>
|
||||
<li>Magic</li>
|
||||
</ul>
|
||||
|
||||
But this:
|
||||
|
||||
* Bird
|
||||
|
||||
* Magic
|
||||
|
||||
will turn into:
|
||||
|
||||
<ul>
|
||||
<li><p>Bird</p></li>
|
||||
<li><p>Magic</p></li>
|
||||
</ul>
|
||||
|
||||
List items may consist of multiple paragraphs. Each subsequent
|
||||
paragraph in a list item must be indented by either 4 spaces
|
||||
or one tab:
|
||||
|
||||
1. This is a list item with two paragraphs. Lorem ipsum dolor
|
||||
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
|
||||
mi posuere lectus.
|
||||
|
||||
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
|
||||
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
|
||||
sit amet velit.
|
||||
|
||||
2. Suspendisse id sem consectetuer libero luctus adipiscing.
|
||||
|
||||
It looks nice if you indent every line of the subsequent
|
||||
paragraphs, but here again, Markdown will allow you to be
|
||||
lazy:
|
||||
|
||||
* This is a list item with two paragraphs.
|
||||
|
||||
This is the second paragraph in the list item. You're
|
||||
only required to indent the first line. Lorem ipsum dolor
|
||||
sit amet, consectetuer adipiscing elit.
|
||||
|
||||
* Another item in the same list.
|
||||
|
||||
To put a blockquote within a list item, the blockquote's `>`
|
||||
delimiters need to be indented:
|
||||
|
||||
* A list item with a blockquote:
|
||||
|
||||
> This is a blockquote
|
||||
> inside a list item.
|
||||
|
||||
To put a code block within a list item, the code block needs
|
||||
to be indented *twice* -- 8 spaces or two tabs:
|
||||
|
||||
* A list item with a code block:
|
||||
|
||||
<code goes here>
|
||||
|
||||
|
||||
It's worth noting that it's possible to trigger an ordered list by
|
||||
accident, by writing something like this:
|
||||
|
||||
1986. What a great season.
|
||||
|
||||
In other words, a *number-period-space* sequence at the beginning of a
|
||||
line. To avoid this, you can backslash-escape the period:
|
||||
|
||||
1986\. What a great season.
|
||||
|
||||
|
||||
|
||||
<h3 id="precode">Code Blocks</h3>
|
||||
|
||||
Pre-formatted code blocks are used for writing about programming or
|
||||
markup source code. Rather than forming normal paragraphs, the lines
|
||||
of a code block are interpreted literally. Markdown wraps a code block
|
||||
in both `<pre>` and `<code>` tags.
|
||||
|
||||
To produce a code block in Markdown, simply indent every line of the
|
||||
block by at least 4 spaces or 1 tab. For example, given this input:
|
||||
|
||||
This is a normal paragraph:
|
||||
|
||||
This is a code block.
|
||||
|
||||
Markdown will generate:
|
||||
|
||||
<p>This is a normal paragraph:</p>
|
||||
|
||||
<pre><code>This is a code block.
|
||||
</code></pre>
|
||||
|
||||
One level of indentation -- 4 spaces or 1 tab -- is removed from each
|
||||
line of the code block. For example, this:
|
||||
|
||||
Here is an example of AppleScript:
|
||||
|
||||
tell application "Foo"
|
||||
beep
|
||||
end tell
|
||||
|
||||
will turn into:
|
||||
|
||||
<p>Here is an example of AppleScript:</p>
|
||||
|
||||
<pre><code>tell application "Foo"
|
||||
beep
|
||||
end tell
|
||||
</code></pre>
|
||||
|
||||
A code block continues until it reaches a line that is not indented
|
||||
(or the end of the article).
|
||||
|
||||
Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
|
||||
are automatically converted into HTML entities. This makes it very
|
||||
easy to include example HTML source code using Markdown -- just paste
|
||||
it and indent it, and Markdown will handle the hassle of encoding the
|
||||
ampersands and angle brackets. For example, this:
|
||||
|
||||
<div class="footer">
|
||||
© 2004 Foo Corporation
|
||||
</div>
|
||||
|
||||
will turn into:
|
||||
|
||||
<pre><code><div class="footer">
|
||||
&copy; 2004 Foo Corporation
|
||||
</div>
|
||||
</code></pre>
|
||||
|
||||
Regular Markdown syntax is not processed within code blocks. E.g.,
|
||||
asterisks are just literal asterisks within a code block. This means
|
||||
it's also easy to use Markdown to write about Markdown's own syntax.
|
||||
|
||||
|
||||
|
||||
<h3 id="hr">Horizontal Rules</h3>
|
||||
|
||||
You can produce a horizontal rule tag (`<hr />`) by placing three or
|
||||
more hyphens, asterisks, or underscores on a line by themselves. If you
|
||||
wish, you may use spaces between the hyphens or asterisks. Each of the
|
||||
following lines will produce a horizontal rule:
|
||||
|
||||
* * *
|
||||
|
||||
***
|
||||
|
||||
*****
|
||||
|
||||
- - -
|
||||
|
||||
---------------------------------------
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
<h2 id="span">Span Elements</h2>
|
||||
|
||||
<h3 id="link">Links</h3>
|
||||
|
||||
Markdown supports two style of links: *inline* and *reference*.
|
||||
|
||||
In both styles, the link text is delimited by [square brackets].
|
||||
|
||||
To create an inline link, use a set of regular parentheses immediately
|
||||
after the link text's closing square bracket. Inside the parentheses,
|
||||
put the URL where you want the link to point, along with an *optional*
|
||||
title for the link, surrounded in quotes. For example:
|
||||
|
||||
This is [an example](http://example.com/ "Title") inline link.
|
||||
|
||||
[This link](http://example.net/) has no title attribute.
|
||||
|
||||
Will produce:
|
||||
|
||||
<p>This is <a href="http://example.com/" title="Title">
|
||||
an example</a> inline link.</p>
|
||||
|
||||
<p><a href="http://example.net/">This link</a> has no
|
||||
title attribute.</p>
|
||||
|
||||
If you're referring to a local resource on the same server, you can
|
||||
use relative paths:
|
||||
|
||||
See my [About](/about/) page for details.
|
||||
|
||||
Reference-style links use a second set of square brackets, inside
|
||||
which you place a label of your choosing to identify the link:
|
||||
|
||||
This is [an example][id] reference-style link.
|
||||
|
||||
You can optionally use a space to separate the sets of brackets:
|
||||
|
||||
This is [an example] [id] reference-style link.
|
||||
|
||||
Then, anywhere in the document, you define your link label like this,
|
||||
on a line by itself:
|
||||
|
||||
[id]: http://example.com/ "Optional Title Here"
|
||||
|
||||
That is:
|
||||
|
||||
* Square brackets containing the link identifier (optionally
|
||||
indented from the left margin using up to three spaces);
|
||||
* followed by a colon;
|
||||
* followed by one or more spaces (or tabs);
|
||||
* followed by the URL for the link;
|
||||
* optionally followed by a title attribute for the link, enclosed
|
||||
in double or single quotes, or enclosed in parentheses.
|
||||
|
||||
The following three link definitions are equivalent:
|
||||
|
||||
[foo]: http://example.com/ "Optional Title Here"
|
||||
[foo]: http://example.com/ 'Optional Title Here'
|
||||
[foo]: http://example.com/ (Optional Title Here)
|
||||
|
||||
**Note:** There is a known bug in Markdown.pl 1.0.1 which prevents
|
||||
single quotes from being used to delimit link titles.
|
||||
|
||||
The link URL may, optionally, be surrounded by angle brackets:
|
||||
|
||||
[id]: <http://example.com/> "Optional Title Here"
|
||||
|
||||
You can put the title attribute on the next line and use extra spaces
|
||||
or tabs for padding, which tends to look better with longer URLs:
|
||||
|
||||
[id]: http://example.com/longish/path/to/resource/here
|
||||
"Optional Title Here"
|
||||
|
||||
Link definitions are only used for creating links during Markdown
|
||||
processing, and are stripped from your document in the HTML output.
|
||||
|
||||
Link definition names may consist of letters, numbers, spaces, and
|
||||
punctuation -- but they are *not* case sensitive. E.g. these two
|
||||
links:
|
||||
|
||||
[link text][a]
|
||||
[link text][A]
|
||||
|
||||
are equivalent.
|
||||
|
||||
The *implicit link name* shortcut allows you to omit the name of the
|
||||
link, in which case the link text itself is used as the name.
|
||||
Just use an empty set of square brackets -- e.g., to link the word
|
||||
"Google" to the google.com web site, you could simply write:
|
||||
|
||||
[Google][]
|
||||
|
||||
And then define the link:
|
||||
|
||||
[Google]: http://google.com/
|
||||
|
||||
Because link names may contain spaces, this shortcut even works for
|
||||
multiple words in the link text:
|
||||
|
||||
Visit [Daring Fireball][] for more information.
|
||||
|
||||
And then define the link:
|
||||
|
||||
[Daring Fireball]: http://daringfireball.net/
|
||||
|
||||
Link definitions can be placed anywhere in your Markdown document. I
|
||||
tend to put them immediately after each paragraph in which they're
|
||||
used, but if you want, you can put them all at the end of your
|
||||
document, sort of like footnotes.
|
||||
|
||||
Here's an example of reference links in action:
|
||||
|
||||
I get 10 times more traffic from [Google] [1] than from
|
||||
[Yahoo] [2] or [MSN] [3].
|
||||
|
||||
[1]: http://google.com/ "Google"
|
||||
[2]: http://search.yahoo.com/ "Yahoo Search"
|
||||
[3]: http://search.msn.com/ "MSN Search"
|
||||
|
||||
Using the implicit link name shortcut, you could instead write:
|
||||
|
||||
I get 10 times more traffic from [Google][] than from
|
||||
[Yahoo][] or [MSN][].
|
||||
|
||||
[google]: http://google.com/ "Google"
|
||||
[yahoo]: http://search.yahoo.com/ "Yahoo Search"
|
||||
[msn]: http://search.msn.com/ "MSN Search"
|
||||
|
||||
Both of the above examples will produce the following HTML output:
|
||||
|
||||
<p>I get 10 times more traffic from <a href="http://google.com/"
|
||||
title="Google">Google</a> than from
|
||||
<a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
|
||||
or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
|
||||
|
||||
For comparison, here is the same paragraph written using
|
||||
Markdown's inline link style:
|
||||
|
||||
I get 10 times more traffic from [Google](http://google.com/ "Google")
|
||||
than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
|
||||
[MSN](http://search.msn.com/ "MSN Search").
|
||||
|
||||
The point of reference-style links is not that they're easier to
|
||||
write. The point is that with reference-style links, your document
|
||||
source is vastly more readable. Compare the above examples: using
|
||||
reference-style links, the paragraph itself is only 81 characters
|
||||
long; with inline-style links, it's 176 characters; and as raw HTML,
|
||||
it's 234 characters. In the raw HTML, there's more markup than there
|
||||
is text.
|
||||
|
||||
With Markdown's reference-style links, a source document much more
|
||||
closely resembles the final output, as rendered in a browser. By
|
||||
allowing you to move the markup-related metadata out of the paragraph,
|
||||
you can add links without interrupting the narrative flow of your
|
||||
prose.
|
||||
|
||||
|
||||
<h3 id="em">Emphasis</h3>
|
||||
|
||||
Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
|
||||
emphasis. Text wrapped with one `*` or `_` will be wrapped with an
|
||||
HTML `<em>` tag; double `*`'s or `_`'s will be wrapped with an HTML
|
||||
`<strong>` tag. E.g., this input:
|
||||
|
||||
*single asterisks*
|
||||
|
||||
_single underscores_
|
||||
|
||||
**double asterisks**
|
||||
|
||||
__double underscores__
|
||||
|
||||
will produce:
|
||||
|
||||
<em>single asterisks</em>
|
||||
|
||||
<em>single underscores</em>
|
||||
|
||||
<strong>double asterisks</strong>
|
||||
|
||||
<strong>double underscores</strong>
|
||||
|
||||
You can use whichever style you prefer; the lone restriction is that
|
||||
the same character must be used to open and close an emphasis span.
|
||||
|
||||
Emphasis can be used in the middle of a word:
|
||||
|
||||
un*frigging*believable
|
||||
|
||||
But if you surround an `*` or `_` with spaces, it'll be treated as a
|
||||
literal asterisk or underscore.
|
||||
|
||||
To produce a literal asterisk or underscore at a position where it
|
||||
would otherwise be used as an emphasis delimiter, you can backslash
|
||||
escape it:
|
||||
|
||||
\*this text is surrounded by literal asterisks\*
|
||||
|
||||
|
||||
|
||||
<h3 id="code">Code</h3>
|
||||
|
||||
To indicate a span of code, wrap it with backtick quotes (`` ` ``).
|
||||
Unlike a pre-formatted code block, a code span indicates code within a
|
||||
normal paragraph. For example:
|
||||
|
||||
Use the `printf()` function.
|
||||
|
||||
will produce:
|
||||
|
||||
<p>Use the <code>printf()</code> function.</p>
|
||||
|
||||
To include a literal backtick character within a code span, you can use
|
||||
multiple backticks as the opening and closing delimiters:
|
||||
|
||||
``There is a literal backtick (`) here.``
|
||||
|
||||
which will produce this:
|
||||
|
||||
<p><code>There is a literal backtick (`) here.</code></p>
|
||||
|
||||
The backtick delimiters surrounding a code span may include spaces --
|
||||
one after the opening, one before the closing. This allows you to place
|
||||
literal backtick characters at the beginning or end of a code span:
|
||||
|
||||
A single backtick in a code span: `` ` ``
|
||||
|
||||
A backtick-delimited string in a code span: `` `foo` ``
|
||||
|
||||
will produce:
|
||||
|
||||
<p>A single backtick in a code span: <code>`</code></p>
|
||||
|
||||
<p>A backtick-delimited string in a code span: <code>`foo`</code></p>
|
||||
|
||||
With a code span, ampersands and angle brackets are encoded as HTML
|
||||
entities automatically, which makes it easy to include example HTML
|
||||
tags. Markdown will turn this:
|
||||
|
||||
Please don't use any `<blink>` tags.
|
||||
|
||||
into:
|
||||
|
||||
<p>Please don't use any <code><blink></code> tags.</p>
|
||||
|
||||
You can write this:
|
||||
|
||||
`—` is the decimal-encoded equivalent of `—`.
|
||||
|
||||
to produce:
|
||||
|
||||
<p><code>&#8212;</code> is the decimal-encoded
|
||||
equivalent of <code>&mdash;</code>.</p>
|
||||
|
||||
|
||||
|
||||
<h3 id="img">Images</h3>
|
||||
|
||||
Admittedly, it's fairly difficult to devise a "natural" syntax for
|
||||
placing images into a plain text document format.
|
||||
|
||||
Markdown uses an image syntax that is intended to resemble the syntax
|
||||
for links, allowing for two styles: *inline* and *reference*.
|
||||
|
||||
Inline image syntax looks like this:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
That is:
|
||||
|
||||
* An exclamation mark: `!`;
|
||||
* followed by a set of square brackets, containing the `alt`
|
||||
attribute text for the image;
|
||||
* followed by a set of parentheses, containing the URL or path to
|
||||
the image, and an optional `title` attribute enclosed in double
|
||||
or single quotes.
|
||||
|
||||
Reference-style image syntax looks like this:
|
||||
|
||||
![Alt text][id]
|
||||
|
||||
Where "id" is the name of a defined image reference. Image references
|
||||
are defined using syntax identical to link references:
|
||||
|
||||
[id]: url/to/image "Optional title attribute"
|
||||
|
||||
As of this writing, Markdown has no syntax for specifying the
|
||||
dimensions of an image; if this is important to you, you can simply
|
||||
use regular HTML `<img>` tags.
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
|
||||
<h2 id="misc">Miscellaneous</h2>
|
||||
|
||||
<h3 id="autolink">Automatic Links</h3>
|
||||
|
||||
Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:
|
||||
|
||||
<http://example.com/>
|
||||
|
||||
Markdown will turn this into:
|
||||
|
||||
<a href="http://example.com/">http://example.com/</a>
|
||||
|
||||
Automatic links for email addresses work similarly, except that
|
||||
Markdown will also perform a bit of randomized decimal and hex
|
||||
entity-encoding to help obscure your address from address-harvesting
|
||||
spambots. For example, Markdown will turn this:
|
||||
|
||||
<address@example.com>
|
||||
|
||||
into something like this:
|
||||
|
||||
<a href="mailto:addre
|
||||
ss@example.co
|
||||
m">address@exa
|
||||
mple.com</a>
|
||||
|
||||
which will render in a browser as a clickable link to "address@example.com".
|
||||
|
||||
(This sort of entity-encoding trick will indeed fool many, if not
|
||||
most, address-harvesting bots, but it definitely won't fool all of
|
||||
them. It's better than nothing, but an address published in this way
|
||||
will probably eventually start receiving spam.)
|
||||
|
||||
|
||||
|
||||
<h3 id="backslash">Backslash Escapes</h3>
|
||||
|
||||
Markdown allows you to use backslash escapes to generate literal
|
||||
characters which would otherwise have special meaning in Markdown's
|
||||
formatting syntax. For example, if you wanted to surround a word
|
||||
with literal asterisks (instead of an HTML `<em>` tag), you can use
|
||||
backslashes before the asterisks, like this:
|
||||
|
||||
\*literal asterisks\*
|
||||
|
||||
Markdown provides backslash escapes for the following characters:
|
||||
|
||||
\ backslash
|
||||
` backtick
|
||||
* asterisk
|
||||
_ underscore
|
||||
{} curly braces
|
||||
[] square brackets
|
||||
() parentheses
|
||||
# hash mark
|
||||
+ plus sign
|
||||
- minus sign (hyphen)
|
||||
. dot
|
||||
! exclamation mark
|
||||
@@ -0,0 +1,30 @@
|
||||
~~one line strikethrough~~
|
||||
|
||||
~~multiple line
|
||||
strike through~~
|
||||
|
||||
The end could not be escaped ~~this is striked\~~
|
||||
|
||||
There is no escape in the middle ~~this is \~~ striked~~ so the end is not striked
|
||||
|
||||
The begin could be escaped \~~this is not striked~~
|
||||
|
||||
* this is a list ~~with a strikethrough~~
|
||||
|
||||
# this is a header ~~with a strikethrough~~ this is still part of the header
|
||||
|
||||
~~strikethrough *could* __contain__ other http://google.it inline elements~~
|
||||
|
||||
~~
|
||||
could not begin
|
||||
with a new line
|
||||
this is not striked~~
|
||||
|
||||
~~ could not begin with a space this is not striked~~
|
||||
|
||||
~~could not end with a space, this is not striked ~~
|
||||
|
||||
~~could not end
|
||||
with a newline
|
||||
this is not striked
|
||||
~~
|
||||
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/strikethrough.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.NonText { color: #8080ff; }
|
||||
.Underlined { color: #c000c0; text-decoration: underline; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Title { color: #c000c0; }
|
||||
.Italic { font-style: italic; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
<span class="Special">~~</span><span class="NonText">one line strikethrough</span><span class="Special">~~</span>
|
||||
|
||||
<span class="Special">~~</span><span class="NonText">multiple line</span>
|
||||
<span class="NonText">strike through</span><span class="Special">~~</span>
|
||||
|
||||
The end could not be escaped <span class="Special">~~</span><span class="NonText">this is striked\</span><span class="Special">~~</span>
|
||||
|
||||
There is no escape in the middle <span class="Special">~~</span><span class="NonText">this is \</span><span class="Special">~~</span> striked~~ so the end is not striked
|
||||
|
||||
The begin could be escaped \~~this is not striked~~
|
||||
|
||||
<span class="Special">* </span>this is a list <span class="Special">~~</span><span class="NonText">with a strikethrough</span><span class="Special">~~</span>
|
||||
|
||||
<span class="Special">#</span><span class="Title"> this is a header </span><span class="Special">~~</span><span class="NonText">with a strikethrough</span><span class="Special">~~</span><span class="Title"> this is still part of the header</span>
|
||||
|
||||
<span class="Special">~~</span><span class="NonText">strikethrough </span><span class="Special">*</span><span class="Italic">could</span><span class="Special">*</span><span class="NonText"> </span><span class="Special">__</span><span class="Bold">contain</span><span class="Special">__</span><span class="NonText"> other </span><span class="Underlined"><a href="http://google.it">http://google.it</a></span><span class="NonText"> inline elements</span><span class="Special">~~</span>
|
||||
|
||||
~~
|
||||
could not begin
|
||||
with a new line
|
||||
this is not striked~~
|
||||
|
||||
~~ could not begin with a space this is not striked~~
|
||||
|
||||
~~could not end with a space, this is not striked ~~
|
||||
|
||||
~~could not end
|
||||
with a newline
|
||||
this is not striked
|
||||
~~
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
This is __strong__ emphasis
|
||||
|
||||
This is also **strong** emphasis
|
||||
|
||||
This is __multiple words__ strong emphasis
|
||||
|
||||
This is also **multiple words** strong emphasis
|
||||
|
||||
This is __ not valid __
|
||||
|
||||
**strong** emphasis could be the first word in the line
|
||||
|
||||
__strong__ emphasis could be the first word in the line
|
||||
|
||||
Strong **emphasis
|
||||
could span** multiple lines
|
||||
|
||||
Strong __emphasis
|
||||
could span__ multiple lines
|
||||
|
||||
Strong __emphasis `could` contain__ inline code
|
||||
|
||||
Strong __emphasis *could* contain__ weak emphasis
|
||||
|
||||
The following is not a strong emphasis __
|
||||
that span multiple lines
|
||||
__ because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The following is not a strong emphasis **
|
||||
that span multiple lines
|
||||
** because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The usage of alternate delimiters must be idempotent, so all __foo__ **foo** __**foo**__ **__foo__** must be "foo" highlighted as bold
|
||||
|
||||
The same delimiter could not be used twice ****foo*** and ____foo____ must be normal
|
||||
|
||||
__foo____bar__ must be "foo" highlighted as bold followed by "{UNDERSCORE}{UNDERSCORE}bar{UNDERSCORE}{UNDERSCORE}" highlighted as normal
|
||||
|
||||
__foo__**bar** must be "foo" highlighted as bold followed by "bar" highlighted as bold
|
||||
|
||||
__foo__b must be "foo" highlighted as bold followed by "b" highlighted as normal
|
||||
|
||||
__foo__bar__baz__ must be "foo" highlighted as bold followed by "bar{UNDERSCORE}baz{UNDERSCORE}" highlighted as normal
|
||||
|
||||
__foo__bar __baz__ must be "foo" and "baz" highlighted as bold and "bar" highlighted as normal
|
||||
|
||||
Four underscore ____ or four asterisks **** must not be highlighted without something in between
|
||||
|
||||
Spaces do not count for something so __ __ and ** ** must be normal
|
||||
|
||||
FOO__BAR must not be normal
|
||||
|
||||
FOO__BAR and BAR__FOO must be normal
|
||||
|
||||
Unfortunately __FOO__BAR doesn't work but escaping \__FOO__BAR is always possible
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/strong_emphasis.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Italic { font-style: italic; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Constant { color: #c00000; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
This is <span class="Special">__</span><span class="Bold">strong</span><span class="Special">__</span> emphasis
|
||||
|
||||
This is also <span class="Special">**</span><span class="Bold">strong</span><span class="Special">**</span> emphasis
|
||||
|
||||
This is <span class="Special">__</span><span class="Bold">multiple words</span><span class="Special">__</span> strong emphasis
|
||||
|
||||
This is also <span class="Special">**</span><span class="Bold">multiple words</span><span class="Special">**</span> strong emphasis
|
||||
|
||||
This is __ not valid __
|
||||
|
||||
<span class="Special">**</span><span class="Bold">strong</span><span class="Special">**</span> emphasis could be the first word in the line
|
||||
|
||||
<span class="Special">__</span><span class="Bold">strong</span><span class="Special">__</span> emphasis could be the first word in the line
|
||||
|
||||
Strong <span class="Special">**</span><span class="Bold">emphasis</span>
|
||||
<span class="Bold">could span</span><span class="Special">**</span> multiple lines
|
||||
|
||||
Strong <span class="Special">__</span><span class="Bold">emphasis</span>
|
||||
<span class="Bold">could span</span><span class="Special">__</span> multiple lines
|
||||
|
||||
Strong <span class="Special">__</span><span class="Bold">emphasis </span><span class="Special">`</span><span class="Constant">could</span><span class="Special">`</span><span class="Bold"> contain</span><span class="Special">__</span> inline code
|
||||
|
||||
Strong <span class="Special">__</span><span class="Bold">emphasis </span><span class="Special">*</span><span class="Italic">could</span><span class="Special">*</span><span class="Bold"> contain</span><span class="Special">__</span> weak emphasis
|
||||
|
||||
The following is not a strong emphasis __
|
||||
that span multiple lines
|
||||
__ because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The following is not a strong emphasis **
|
||||
that span multiple lines
|
||||
** because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The usage of alternate delimiters must be idempotent, so all <span class="Special">__</span><span class="Bold">foo</span><span class="Special">__</span> <span class="Special">**</span><span class="Bold">foo</span><span class="Special">**</span> <span class="Special">__**</span><span class="Bold">foo</span><span class="Special">**__</span> <span class="Special">**__</span><span class="Bold">foo</span><span class="Special">__**</span> must be "foo" highlighted as bold
|
||||
|
||||
The same delimiter could not be used twice ****foo*** and ____foo____ must be normal
|
||||
|
||||
<span class="Special">__</span><span class="Bold">foo</span><span class="Special">__</span>__bar__ must be "foo" highlighted as bold followed by "{UNDERSCORE}{UNDERSCORE}bar{UNDERSCORE}{UNDERSCORE}" highlighted as normal
|
||||
|
||||
<span class="Special">__</span><span class="Bold">foo</span><span class="Special">__**</span><span class="Bold">bar</span><span class="Special">**</span> must be "foo" highlighted as bold followed by "bar" highlighted as bold
|
||||
|
||||
<span class="Special">__</span><span class="Bold">foo</span><span class="Special">__</span>b must be "foo" highlighted as bold followed by "b" highlighted as normal
|
||||
|
||||
<span class="Special">__</span><span class="Bold">foo</span><span class="Special">__</span>bar__baz__ must be "foo" highlighted as bold followed by "bar{UNDERSCORE}baz{UNDERSCORE}" highlighted as normal
|
||||
|
||||
<span class="Special">__</span><span class="Bold">foo</span><span class="Special">__</span>bar <span class="Special">__</span><span class="Bold">baz</span><span class="Special">__</span> must be "foo" and "baz" highlighted as bold and "bar" highlighted as normal
|
||||
|
||||
Four underscore ____ or four asterisks **** must not be highlighted without something in between
|
||||
|
||||
Spaces do not count for something so __ __ and ** ** must be normal
|
||||
|
||||
FOO__BAR must not be normal
|
||||
|
||||
FOO__BAR and BAR__FOO must be normal
|
||||
|
||||
Unfortunately <span class="Special">__</span><span class="Bold">FOO</span><span class="Special">__</span>BAR doesn't work but escaping \__FOO__BAR is always possible
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
105
.vim/pack/plugins/start/vim-markdown/spec/features/tables.md
Normal file
105
.vim/pack/plugins/start/vim-markdown/spec/features/tables.md
Normal file
@@ -0,0 +1,105 @@
|
||||
Tables with at least two columns at least must have pipes to separate columns
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
Row-2-Column-1|Row-2-Column-2
|
||||
|
||||
|Header-1|Header-2
|
||||
|---|---
|
||||
|Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
Header-1|Header-2|
|
||||
---|---|
|
||||
Row-1-Column-1|Row-1-Column-2|
|
||||
|
||||
|Header-1|Header-2|
|
||||
|---|---|
|
||||
|Row-1-Column-1|Row-1-Column-2|
|
||||
|
||||
|
||||
Between dashes and pipes spaces are allowed
|
||||
|
||||
Header-1 | Header-2
|
||||
--- | ---
|
||||
Row-1-Column-1 | Row-1-Column-2
|
||||
|
||||
|
||||
Tables with alignment hints (left, right and center)
|
||||
|
||||
Header-1 | Header-2
|
||||
:--------------|:--------------
|
||||
Row-1-Column-1 | Row-1-Column-2
|
||||
|
||||
Header-1 | Header-2
|
||||
--------------:|--------------:
|
||||
Row-1-Column-1 | Row-1-Column-2
|
||||
|
||||
Header-1 | Header-2
|
||||
:-------------:|:-------------:
|
||||
Row-1-Column-1 | Row-1-Column-2
|
||||
|
||||
|
||||
Tables could contain inline elements
|
||||
|
||||
www.example.com | Header-2
|
||||
--- | ---
|
||||
~~Row-1-Column-1~~ | *Row-1-Column-2*
|
||||
|
||||
|
||||
Tables with single column at least should have a pipes on one side
|
||||
|
||||
|Header-1
|
||||
|---
|
||||
|Row-1-Column-1
|
||||
|
||||
Header-1|
|
||||
---|
|
||||
Row-1-Column-1|
|
||||
|
||||
|Header-1|
|
||||
|---|
|
||||
|Row-1-Column-1|
|
||||
|
||||
So this is not not a table with one column but some stings and a separator (it's not an header because it doesn't begin at the first column)
|
||||
|
||||
Header-1
|
||||
---
|
||||
Row-1-Column-1
|
||||
|
||||
|
||||
Tables could have only headers
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
|
||||
|
||||
Surprisingly tables could have as many leading spaces as wanted, they never turn as code blocks
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
|
||||
Tables should be preceded by an empty line, so the following is not a table
|
||||
|
||||
Not an empty line
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
|
||||
The separator between header and the rows should have at least 3 dashes, so the following is not a table
|
||||
|
||||
Header-1|Header-2
|
||||
--|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/tables.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.NonText { color: #8080ff; }
|
||||
.Underlined { color: #c000c0; text-decoration: underline; }
|
||||
.Special { color: #c000c0; }
|
||||
.Italic { font-style: italic; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Identifier { color: #008080; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
Tables with at least two columns at least must have pipes to separate columns
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
Row-2-Column-1<span class="Special">|</span>Row-2-Column-2
|
||||
|
||||
<span class="Bold"> </span><span class="Special">|</span><span class="Bold">Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> |---|---</span>
|
||||
<span class="Special">|</span>Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span><span class="Special">|</span>
|
||||
<span class="Special"> ---|---|</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2<span class="Special">|</span>
|
||||
|
||||
<span class="Bold"> </span><span class="Special">|</span><span class="Bold">Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span><span class="Special">|</span>
|
||||
<span class="Special"> |---|---|</span>
|
||||
<span class="Special">|</span>Row-1-Column-1<span class="Special">|</span>Row-1-Column-2<span class="Special">|</span>
|
||||
|
||||
|
||||
Between dashes and pipes spaces are allowed
|
||||
|
||||
<span class="Bold"> Header-1 </span><span class="Special">|</span><span class="Bold"> Header-2</span>
|
||||
<span class="Special"> --- | ---</span>
|
||||
Row-1-Column-1 <span class="Special">|</span> Row-1-Column-2
|
||||
|
||||
|
||||
Tables with alignment hints (left, right and center)
|
||||
|
||||
<span class="Bold"> Header-1 </span><span class="Special">|</span><span class="Bold"> Header-2</span>
|
||||
<span class="Special"> :--------------|:--------------</span>
|
||||
Row-1-Column-1 <span class="Special">|</span> Row-1-Column-2
|
||||
|
||||
<span class="Bold"> Header-1 </span><span class="Special">|</span><span class="Bold"> Header-2</span>
|
||||
<span class="Special"> --------------:|--------------:</span>
|
||||
Row-1-Column-1 <span class="Special">|</span> Row-1-Column-2
|
||||
|
||||
<span class="Bold"> Header-1 </span><span class="Special">|</span><span class="Bold"> Header-2</span>
|
||||
<span class="Special"> :-------------:|:-------------:</span>
|
||||
Row-1-Column-1 <span class="Special">|</span> Row-1-Column-2
|
||||
|
||||
|
||||
Tables could contain inline elements
|
||||
|
||||
<span class="Bold"> </span><span class="Underlined">www.example.com</span><span class="Bold"> </span><span class="Special">|</span><span class="Bold"> Header-2</span>
|
||||
<span class="Special"> --- | ---</span>
|
||||
<span class="Special">~~</span><span class="NonText">Row-1-Column-1</span><span class="Special">~~</span> <span class="Special">|</span> <span class="Special">*</span><span class="Italic">Row-1-Column-2</span><span class="Special">*</span>
|
||||
|
||||
|
||||
Tables with single column at least should have a pipes on one side
|
||||
|
||||
<span class="Bold"> </span><span class="Special">|</span><span class="Bold">Header-1</span>
|
||||
<span class="Special"> |---</span>
|
||||
<span class="Special">|</span>Row-1-Column-1
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span>
|
||||
<span class="Special"> ---|</span>
|
||||
Row-1-Column-1<span class="Special">|</span>
|
||||
|
||||
<span class="Bold"> </span><span class="Special">|</span><span class="Bold">Header-1</span><span class="Special">|</span>
|
||||
<span class="Special"> |---|</span>
|
||||
<span class="Special">|</span>Row-1-Column-1<span class="Special">|</span>
|
||||
|
||||
So this is not not a table with one column but some stings and a separator (it's not an header because it doesn't begin at the first column)
|
||||
|
||||
Header-1
|
||||
<span class="Identifier"> ---</span>
|
||||
Row-1-Column-1
|
||||
|
||||
|
||||
Tables could have only headers
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
|
||||
|
||||
Surprisingly tables could have as many leading spaces as wanted, they never turn as code blocks
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
|
||||
<span class="Bold"> Header-1</span><span class="Special">|</span><span class="Bold">Header-2</span>
|
||||
<span class="Special"> ---|---</span>
|
||||
Row-1-Column-1<span class="Special">|</span>Row-1-Column-2
|
||||
|
||||
|
||||
Tables should be preceded by an empty line, so the following is not a table
|
||||
|
||||
Not an empty line
|
||||
Header-1|Header-2
|
||||
---|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
|
||||
The separator between header and the rows should have at least 3 dashes, so the following is not a table
|
||||
|
||||
Header-1|Header-2
|
||||
--|---
|
||||
Row-1-Column-1|Row-1-Column-2
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
This is _weak_ emphasis
|
||||
|
||||
This is also *weak* emphasis
|
||||
|
||||
This is _multiple words_ weak emphasis
|
||||
|
||||
This is also *multiple words* weak emphasis
|
||||
|
||||
This is _ not valid _ because the start delimiter must be followed by something (not a space)
|
||||
|
||||
*weak* emphasis could be the first word in the line
|
||||
|
||||
_weak_ emphasis could be the first word in the line
|
||||
|
||||
Weak *emphasis
|
||||
could span* multiple lines
|
||||
|
||||
Weak _emphasis
|
||||
could span_ multiple lines
|
||||
|
||||
Weak _emphasis `could` contain_ inline code
|
||||
|
||||
Weak _emphasis **could** contain_ strong emphasis
|
||||
|
||||
The following is not a weak emphasis _
|
||||
that span multiple lines
|
||||
_ because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The following is not a weak emphasis *
|
||||
that span multiple
|
||||
lines* because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The usage of alternate delimiters must be idempotent, so all _foo_ *foo* _*foo*_ *_foo_* must be "foo" highlighted as italic
|
||||
|
||||
The same delimiter could not be used twice **foo** and __foo__ must not be highlighted as italic
|
||||
|
||||
_foo__bar_ must be "foo" highlighted as italic followed by "{UNDERSCORE}bar{UNDERSCORE}" highlighted as normal
|
||||
|
||||
_foo_*bar* must be "foo" highlighted as italic followed by "bar" highlighted as italic
|
||||
|
||||
_foo_b must be "foo" highlighted as italic followed by "b" highlighted as normal
|
||||
|
||||
_foo_bar_baz_ must be "foo" highlighted as italic followed by "bar{UNDERSCORE}baz{UNDERSCORE}" highlighted as normal
|
||||
|
||||
_foo_bar _baz_ must be "foo" and "baz" highlighted as italic and "bar" highlighted as normal
|
||||
|
||||
Two underscores __ or two asterisks ** must not be highlighted without something between them
|
||||
|
||||
Spaces do not count for something so _ _ and * * must be normal
|
||||
|
||||
FOO_BAR must be normal
|
||||
|
||||
FOO_BAR and BAR_FOO must be normal
|
||||
|
||||
Unfortunately _FOO_BAR doesn't work but escaping \_FOO_BAR is always possible
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>~/code/vim-markdown/spec/features/weak_emphasis.md.html</title>
|
||||
<meta name="Generator" content="Vim/7.4">
|
||||
<meta name="plugin-version" content="vim7.4_v1">
|
||||
<meta name="syntax" content="markdown">
|
||||
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
|
||||
<meta name="colorscheme" content="none">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
body { font-family: monospace; color: #000000; background-color: #ffffff; }
|
||||
* { font-size: 1em; }
|
||||
.Constant { color: #c00000; }
|
||||
.Bold { font-weight: bold; }
|
||||
.Italic { font-style: italic; }
|
||||
.Special { color: #c000c0; }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id='vimCodeElement'>
|
||||
|
||||
This is <span class="Special">_</span><span class="Italic">weak</span><span class="Special">_</span> emphasis
|
||||
|
||||
This is also <span class="Special">*</span><span class="Italic">weak</span><span class="Special">*</span> emphasis
|
||||
|
||||
This is <span class="Special">_</span><span class="Italic">multiple words</span><span class="Special">_</span> weak emphasis
|
||||
|
||||
This is also <span class="Special">*</span><span class="Italic">multiple words</span><span class="Special">*</span> weak emphasis
|
||||
|
||||
This is _ not valid _ because the start delimiter must be followed by something (not a space)
|
||||
|
||||
<span class="Special">*</span><span class="Italic">weak</span><span class="Special">*</span> emphasis could be the first word in the line
|
||||
|
||||
<span class="Special">_</span><span class="Italic">weak</span><span class="Special">_</span> emphasis could be the first word in the line
|
||||
|
||||
Weak <span class="Special">*</span><span class="Italic">emphasis</span>
|
||||
<span class="Italic">could span</span><span class="Special">*</span> multiple lines
|
||||
|
||||
Weak <span class="Special">_</span><span class="Italic">emphasis</span>
|
||||
<span class="Italic">could span</span><span class="Special">_</span> multiple lines
|
||||
|
||||
Weak <span class="Special">_</span><span class="Italic">emphasis </span><span class="Special">`</span><span class="Constant">could</span><span class="Special">`</span><span class="Italic"> contain</span><span class="Special">_</span> inline code
|
||||
|
||||
Weak <span class="Special">_</span><span class="Italic">emphasis </span><span class="Special">**</span><span class="Bold">could</span><span class="Special">**</span><span class="Italic"> contain</span><span class="Special">_</span> strong emphasis
|
||||
|
||||
The following is not a weak emphasis _
|
||||
that span multiple lines
|
||||
_ because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The following is not a weak emphasis *
|
||||
that span multiple
|
||||
lines* because the start delimiter must be followed by something (not the end of line)
|
||||
|
||||
The usage of alternate delimiters must be idempotent, so all <span class="Special">_</span><span class="Italic">foo</span><span class="Special">_</span> <span class="Special">*</span><span class="Italic">foo</span><span class="Special">*</span> <span class="Special">_*</span><span class="Italic">foo</span><span class="Special">*_</span> <span class="Special">*_</span><span class="Italic">foo</span><span class="Special">_*</span> must be "foo" highlighted as italic
|
||||
|
||||
The same delimiter could not be used twice <span class="Special">**</span><span class="Bold">foo</span><span class="Special">**</span> and <span class="Special">__</span><span class="Bold">foo</span><span class="Special">__</span> must not be highlighted as italic
|
||||
|
||||
<span class="Special">_</span><span class="Italic">foo</span><span class="Special">_</span>_bar_ must be "foo" highlighted as italic followed by "{UNDERSCORE}bar{UNDERSCORE}" highlighted as normal
|
||||
|
||||
<span class="Special">_</span><span class="Italic">foo</span><span class="Special">_*</span><span class="Italic">bar</span><span class="Special">*</span> must be "foo" highlighted as italic followed by "bar" highlighted as italic
|
||||
|
||||
<span class="Special">_</span><span class="Italic">foo</span><span class="Special">_</span>b must be "foo" highlighted as italic followed by "b" highlighted as normal
|
||||
|
||||
<span class="Special">_</span><span class="Italic">foo</span><span class="Special">_</span>bar_baz_ must be "foo" highlighted as italic followed by "bar{UNDERSCORE}baz{UNDERSCORE}" highlighted as normal
|
||||
|
||||
<span class="Special">_</span><span class="Italic">foo</span><span class="Special">_</span>bar <span class="Special">_</span><span class="Italic">baz</span><span class="Special">_</span> must be "foo" and "baz" highlighted as italic and "bar" highlighted as normal
|
||||
|
||||
Two underscores __ or two asterisks ** must not be highlighted without something between them
|
||||
|
||||
Spaces do not count for something so _ _ and * * must be normal
|
||||
|
||||
FOO_BAR must be normal
|
||||
|
||||
FOO_BAR and BAR_FOO must be normal
|
||||
|
||||
Unfortunately <span class="Special">_</span><span class="Italic">FOO</span><span class="Special">_</span>BAR doesn't work but escaping \_FOO_BAR is always possible
|
||||
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
||||
@@ -0,0 +1,48 @@
|
||||
require "nokogiri"
|
||||
require_relative "spec_helper"
|
||||
|
||||
features = [
|
||||
"jekyll",
|
||||
"lists",
|
||||
"lists_with_tasks",
|
||||
"lists_with_lists",
|
||||
"lists_with_tables",
|
||||
"lists_with_codeblocks",
|
||||
"lists_with_fenced_codeblocks",
|
||||
"lists_with_anchored_elements",
|
||||
"autolinks",
|
||||
"blockquotes",
|
||||
"blockquotes_nested",
|
||||
"combined_emphasis",
|
||||
"contained_emphasis",
|
||||
"strikethrough",
|
||||
"headers_atx",
|
||||
"headers_setext",
|
||||
"strong_emphasis",
|
||||
"weak_emphasis",
|
||||
"inline_html",
|
||||
"inline_links",
|
||||
"inline_references",
|
||||
"codeblocks",
|
||||
"tables"
|
||||
]
|
||||
|
||||
describe "github markdown syntax" do
|
||||
let(:filename) {"syntax.html"}
|
||||
|
||||
features.each do |feature|
|
||||
source = File.expand_path("./features/#{feature}.md", File.dirname(__FILE__))
|
||||
master = source + ".html"
|
||||
it "should support #{feature.gsub("_", " ")}" do
|
||||
vim.command "let g:markdown_flavor=github"
|
||||
vim.edit source
|
||||
vim.command "TOhtml | w #{filename}"
|
||||
if not File.exists?(master) or ENV["GENERATE_GOLDEN_MASTER"]
|
||||
vim.command "w #{master}"
|
||||
end
|
||||
master_syntax = Nokogiri::HTML(IO.read(master))
|
||||
source_syntax = Nokogiri::HTML(IO.read(filename))
|
||||
expect(source_syntax.css("#vimCodeElement").first.to_s).to eq(master_syntax.css("#vimCodeElement").first.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
require "nokogiri"
|
||||
require_relative "spec_helper"
|
||||
|
||||
features = [
|
||||
"kramdown/headers_with_id"
|
||||
]
|
||||
|
||||
describe "kramdown markdown syntax" do
|
||||
let(:filename) {"syntax.html"}
|
||||
|
||||
features.each do |feature|
|
||||
source = File.expand_path("./features/#{feature}.md", File.dirname(__FILE__))
|
||||
master = source + ".html"
|
||||
it "should support #{feature.split(/\//).last.gsub("_", " ")}" do
|
||||
vim.command "let g:markdown_flavor='kramdown'"
|
||||
vim.edit source
|
||||
vim.command "TOhtml | w #{filename}"
|
||||
if not File.exists?(master) or ENV["GENERATE_GOLDEN_MASTER"]
|
||||
vim.command "w #{master}"
|
||||
end
|
||||
master_syntax = Nokogiri::HTML(IO.read(master))
|
||||
source_syntax = Nokogiri::HTML(IO.read(filename))
|
||||
expect(source_syntax.css("#vimCodeElement").first.to_s).to eq(master_syntax.css("#vimCodeElement").first.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
40
.vim/pack/plugins/start/vim-markdown/spec/spec_helper.rb
Normal file
40
.vim/pack/plugins/start/vim-markdown/spec/spec_helper.rb
Normal file
@@ -0,0 +1,40 @@
|
||||
require "rspec"
|
||||
require "vimrunner"
|
||||
require "vimrunner/rspec"
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.formatter = :documentation
|
||||
end
|
||||
|
||||
Vimrunner::RSpec.configure do |config|
|
||||
plugin_path = File.expand_path("..", File.dirname(__FILE__))
|
||||
|
||||
config.reuse_server = false
|
||||
config.start_vim do
|
||||
vim = Vimrunner.start
|
||||
vim.prepend_runtimepath(plugin_path)
|
||||
vim.command "let g:markdown_include_jekyll_support = 1"
|
||||
vim.command "set nospell"
|
||||
vim.command "set nofoldenable"
|
||||
vim
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
require_relative "support/vim"
|
||||
config.include Support::Vim
|
||||
config.after(:each) do
|
||||
if File.exists? source
|
||||
File.delete source
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RSpec::Matchers.define :have_content do |expected|
|
||||
match do |source|
|
||||
File.read(source).match(expected)
|
||||
end
|
||||
failure_message_for_should do |source|
|
||||
"expected file '#{source}' to match '#{expected}' but contains:\n'#{File.read(source)}'"
|
||||
end
|
||||
end
|
||||
16
.vim/pack/plugins/start/vim-markdown/spec/support/vim.rb
Normal file
16
.vim/pack/plugins/start/vim-markdown/spec/support/vim.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require "tmpdir"
|
||||
|
||||
module Support
|
||||
module Vim
|
||||
def source
|
||||
File.join(Dir.tmpdir, filename)
|
||||
end
|
||||
|
||||
def given_content(string)
|
||||
vim.edit source
|
||||
vim.insert string
|
||||
yield source
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user