]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge pull request #367 from 91khr/master
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Wed, 9 Jan 2019 11:18:54 +0000 (20:18 +0900)
committerGitHub <noreply@github.com>
Wed, 9 Jan 2019 11:18:54 +0000 (20:18 +0900)
Add support for strike through which is supported by GFM

.travis.yml
README.md
doc/vim-markdown.txt
ftdetect/markdown.vim
ftplugin/markdown.vim
indent/markdown.vim
syntax/markdown.vim
test/syntax.vader

index 90cc371b1ac2ce06df82e2c391393a166c6a24f3..338161ca03d40c687b5f44c56cd7e62a53b88db7 100644 (file)
@@ -25,7 +25,7 @@ before_script: |
     cd "$TRAVIS_BUILD_DIR"
   fi
   if [ "$TRAVIS_OS_NAME" = "osx" ]; then
-    sudo -H easy_install pip
+    curl https://bootstrap.pypa.io/get-pip.py | sudo python
   fi
   sudo -H pip install virtualenv
 
index 8c056ce0c6a273676e4b431e81dbf4bc05a9bc77..982248e299a32b8aa4d6687ceb688e8b591e67f7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@
 Syntax highlighting, matching rules and mappings for [the original Markdown](http://daringfireball.net/projects/markdown/) and extensions.
 
 1. [Installation](#installation)
+1. [Basic usage](#basic-usage)
 1. [Options](#options)
 1. [Mappings](#mappings)
 1. [Commands](#commands)
@@ -52,6 +53,37 @@ cd ~/.vim
 tar --strip=1 -zxf vim-markdown-master.tar.gz
 ```
 
+## Basic usage
+
+### Folding
+
+Folding is enabled for headers by default.
+
+The following commands are useful to open and close folds:
+
+- `zr`: reduces fold level throughout the buffer
+- `zR`: opens all folds
+- `zm`: increases fold level throughout the buffer
+- `zM`: folds everything all the way
+- `za`: open a fold your cursor is on
+- `zA`: open a fold your cursor is on recursively
+- `zc`: close a fold your cursor is on
+- `zC`: close a fold your cursor is on recursively
+
+[Options](#options) are available to disable folding or change folding style.
+
+Try `:help fold-expr` and `:help fold-commands` for details.
+
+### Concealing
+
+Concealing is set for some syntax such as bold, italic, code block and link.
+
+Concealing lets you conceal text with other text. The actual source text is not modified. If you put your cursor on the concealed line, the conceal goes away.
+
+[Options](#options) are available to disable or change concealing.
+
+Try `:help concealcursor` and `:help conceallevel` for details.
+
 ## Options
 
 ### Disable Folding
@@ -293,6 +325,30 @@ If you would like to use a file extension other than `.md` you may do so using t
 let g:vim_markdown_auto_extension_ext = 'txt'
 ```
 
+### Do not automatically insert bulletpoints
+
+Automatically inserting bulletpoints can lead to problems when wrapping text
+(see issue #232 for details), so it can be disabled:
+
+```vim
+let g:vim_markdown_auto_insert_bullets = 0
+```
+
+In that case, you probably also want to set the new list item indent to 0 as
+well, or you will have to remove an indent each time you add a new list item:
+
+```vim
+let g:vim_markdown_new_list_item_indent = 0
+```
+
+### Change how to open new files
+
+By default when following a link the target file will be opened in your current buffer.  This behavior can change if you prefer using splits or tabs by using the `vim_markdown_edit_url_in` variable.  Possible values are `tab`, `vsplit`, `hsplit`, `current` opening in a new tab, vertical split, horizontal split, and current buffer respectively.  Defaults to current buffer if not set:
+
+```vim
+let g:vim_markdown_edit_url_in = 'tab'
+```
+
 ## Mappings
 
 The following work on normal and visual modes:
index 714d3a957e2ba503fd63695332994e50f8ffa4b3..29ed66ddc5f7940de3f647cd4b26a8a225ef488f 100644 (file)
@@ -5,7 +5,10 @@ Contents ~
 
  1. Introduction                                    |vim-markdown-introduction|
  2. Installation                                    |vim-markdown-installation|
- 3. Options                                              |vim-markdown-options|
+ 3. Basic usage                                      |vim-markdown-basic-usage|
+  1. Folding                                             |vim-markdown-folding|
+  2. Concealing                                       |vim-markdown-concealing|
+ 4. Options                                              |vim-markdown-options|
   1. Disable Folding                             |vim-markdown-disable-folding|
   2. Change fold style                         |vim-markdown-change-fold-style|
   3. Set header folding level           |vim-markdown-set-header-folding-level|
@@ -26,12 +29,16 @@ Contents ~
                 |vim-markdown-do-not-require-.md-extensions-for-markdown-links|
   13. Auto-write when following link
                                   |vim-markdown-auto-write-when-following-link|
-  14. Change default file extension           |vim-markdown-auto-extension-ext|
- 4. Mappings                                            |vim-markdown-mappings|
- 5. Commands                                            |vim-markdown-commands|
- 6. Credits                                              |vim-markdown-credits|
- 7. License                                              |vim-markdown-license|
- 8. References                                        |vim-markdown-references|
+  14. Change default file extension
+                                   |vim-markdown-change-default-file-extension|
+  15. Do not automatically insert bulletpoints
+                        |vim-markdown-do-not-automatically-insert-bulletpoints|
+  16. Change how to open new files  |vim-markdown-change-how-to-open-new-files|
+ 5. Mappings                                            |vim-markdown-mappings|
+ 6. Commands                                            |vim-markdown-commands|
+ 7. Credits                                              |vim-markdown-credits|
+ 8. License                                              |vim-markdown-license|
+ 9. References                                        |vim-markdown-references|
 
 ===============================================================================
                                                     *vim-markdown-introduction*
@@ -73,6 +80,52 @@ If you are not using any package manager, download the tarball [5] and do this:
   cd ~/.vim
   tar --strip=1 -zxf vim-markdown-master.tar.gz
 <
+===============================================================================
+                                                     *vim-markdown-basic-usage*
+Basic usage ~
+
+-------------------------------------------------------------------------------
+                                                         *vim-markdown-folding*
+Folding ~
+
+Folding is enabled for headers by default.
+
+The following commands are useful to open and close folds:
+
+                                                              *vim-markdown-zr*
+- 'zr': reduces fold level throughout the buffer
+                                                              *vim-markdown-zR*
+- 'zR': opens all folds
+                                                              *vim-markdown-zm*
+- 'zm': increases fold level throughout the buffer
+                                                              *vim-markdown-zM*
+- 'zM': folds everything all the way
+                                                              *vim-markdown-za*
+- 'za': open a fold your cursor is on
+                                                              *vim-markdown-zA*
+- 'zA': open a fold your cursor is on recursively
+                                                              *vim-markdown-zc*
+- 'zc': close a fold your cursor is on
+                                                              *vim-markdown-zC*
+- 'zC': close a fold your cursor is on recursively
+
+Options are available to disable folding or change folding style.
+
+Try ':help fold-expr' and ':help fold-commands' for details.
+
+-------------------------------------------------------------------------------
+                                                      *vim-markdown-concealing*
+Concealing ~
+
+Concealing is set for some syntax such as bold, italic, code block and link.
+
+Concealing lets you conceal text with other text. The actual source text is not
+modified. If you put your cursor on the concealed line, the conceal goes away.
+
+Options are available to disable or change concealing.
+
+Try ':help concealcursor' and ':help conceallevel' for details.
+
 ===============================================================================
                                                          *vim-markdown-options*
 Options ~
@@ -144,7 +197,7 @@ never increases its default size (half screen), it only shrinks.
 Text emphasis restriction to single-lines ~
 
 By default text emphasis works across multiple lines until a closing token is
-found. However, it's possible to restrict text emphasis to a single line (ie,
+found. However, it's possible to restrict text emphasis to a single line (i.e.,
 for it to be applied a closing token must be found on the same line). To do so:
 >
   let g:vim_markdown_emphasis_multiline = 0
@@ -197,9 +250,9 @@ Default is "['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini']".
                                             *vim-markdown-follow-named-anchors*
 Follow named anchors ~
 
-This feature allows ge to follow named anchors in links of the form
-'file#anchor' or just '#anchor', where file may omit the '.md' extension as
-usual. Two variables control its operation:
+This feature allows the 'ge' command to follow named anchors in links of the
+form 'file#anchor' or just '#anchor', where file may omit the '.md' extension
+as usual. Two variables control its operation:
 >
   let g:vim_markdown_follow_anchor = 1
 <
@@ -311,7 +364,7 @@ this option will automatically save any edits you made before moving you:
   let g:vim_markdown_autowrite = 1
 <
 -------------------------------------------------------------------------------
-                                              *vim-markdown-auto-extension-ext*
+                                   *vim-markdown-change-default-file-extension*
 Change default file extension ~
 
 If you would like to use a file extension other than '.md' you may do so using
@@ -319,6 +372,32 @@ the 'vim_markdown_auto_extension_ext' variable:
 >
   let g:vim_markdown_auto_extension_ext = 'txt'
 <
+-------------------------------------------------------------------------------
+                        *vim-markdown-do-not-automatically-insert-bulletpoints*
+Do not automatically insert bulletpoints ~
+
+Automatically inserting bulletpoints can lead to problems when wrapping text
+(see issue #232 for details), so it can be disabled:
+>
+  let g:vim_markdown_auto_insert_bullets = 0
+<
+In that case, you probably also want to set the new list item indent to 0 as
+well, or you will have to remove an indent each time you add a new list item:
+>
+  let g:vim_markdown_new_list_item_indent = 0
+<
+-------------------------------------------------------------------------------
+                                    *vim-markdown-change-how-to-open-new-files*
+Change how to open new files ~
+
+By default when following a link the target file will be opened in your current
+buffer. This behavior can change if you prefer using splits or tabs by using
+the 'vim_markdown_edit_url_in' variable. Possible values are 'tab', 'vsplit',
+'hsplit', 'current' opening in a new tab, vertical split, horizontal split, and
+current buffer respectively. Defaults to current buffer if not set:
+>
+  let g:vim_markdown_edit_url_in = 'tab'
+<
 ===============================================================================
                                                         *vim-markdown-mappings*
 Mappings ~
index 611ecaa0d0cf8331ea4c6b8047f62657bb04a20a..07682da4cd5da623e60725215198c89f5bda7411 100644 (file)
@@ -1,3 +1,8 @@
+if !has('patch-7.4.480')
+    " Before this patch, vim used modula2 for .md.
+    au! filetypedetect BufRead,BufNewFile *.md
+endif
+
 " markdown filetype file
-au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=markdown
-au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx} set filetype=markdown
+au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} setfiletype markdown
+au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx} setfiletype markdown
index 1aa3494fd9c5f8cf7426a777e61d8a562f0056f3..659df91727c09c2feb838d1222ed78e4447cec01 100644 (file)
@@ -609,7 +609,23 @@ if !exists('*s:EditUrlUnderCursor')
                     endif
                 endif
                 let l:url = fnameescape(fnamemodify(expand('%:h').'/'.l:url.l:ext, ':.'))
-                execute 'edit' l:url
+                let l:editmethod = ''
+                " determine how to open the linked file (split, tab, etc)
+                if exists('g:vim_markdown_edit_url_in')
+                  if g:vim_markdown_edit_url_in == 'tab'
+                    let l:editmethod = 'tabnew'
+                  elseif g:vim_markdown_edit_url_in == 'vsplit'
+                    let l:editmethod = 'vsp'
+                  elseif g:vim_markdown_edit_url_in == 'hsplit'
+                    let l:editmethod = 'sp'
+                  else
+                    let l:editmethod = 'edit'
+                  endif
+                else
+                  " default to current buffer
+                  let l:editmethod = 'edit'
+                endif
+                execute l:editmethod l:url
             endif
             if l:anchor != ''
                 silent! execute '/'.l:anchor
@@ -718,7 +734,7 @@ function! s:MarkdownHighlightSources(force)
                 let include = '@' . toupper(filetype)
             endif
             let command = 'syntax region %s matchgroup=%s start="^\s*```\s*%s$" matchgroup=%s end="\s*```$" keepend contains=%s%s'
-            execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) ? ' concealends' : '')
+            execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) && get(g:, 'vim_markdown_conceal_code_blocks', 1) ? ' concealends' : '')
             execute printf('syntax cluster mkdNonListItem add=%s', group)
 
             let b:mkd_known_filetypes[ft] = 1
index 103e160f92fd848427ec321543562fe64094758d..2fa4cda8f7686fb9dd43a76286ea0e6088688080 100755 (executable)
@@ -5,15 +5,15 @@ setlocal indentexpr=GetMarkdownIndent()
 setlocal nolisp
 setlocal autoindent
 
-" Automatically insert bullets
-setlocal formatoptions+=r
-" Do not automatically insert bullets when auto-wrapping with text-width
-setlocal formatoptions-=c
-" Accept various markers as bullets
-setlocal comments=b:*,b:+,b:-
-
 " Automatically continue blockquote on line break
-setlocal comments+=b:>
+setlocal formatoptions+=r
+setlocal comments=b:>
+if get(g:, "vim_markdown_auto_insert_bullets", 1)
+    " Do not automatically insert bullets when auto-wrapping with text-width
+    setlocal formatoptions-=c
+    " Accept various markers as bullets
+    setlocal comments+=b:*,b:+,b:-
+endif
 
 " Only define the function once
 if exists("*GetMarkdownIndent") | finish | endif
index aad7dc477eadcd81f7095d7cd7dbf6296f2323a9..86b10b0b9bd65b6d0a20fec4668169fd4d29b6d8 100644 (file)
@@ -36,10 +36,14 @@ syn sync linebreaks=1
 
 let s:conceal = ''
 let s:concealends = ''
+let s:concealcode = ''
 if has('conceal') && get(g:, 'vim_markdown_conceal', 1)
   let s:conceal = ' conceal'
   let s:concealends = ' concealends'
 endif
+if has('conceal') && get(g:, 'vim_markdown_conceal_code_blocks', 1)
+  let s:concealcode = ' concealends'
+endif
 
 " additions to HTML groups
 if get(g:, 'vim_markdown_emphasis_multiline', 1)
@@ -82,25 +86,25 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+     end=+'+  contained
 syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+     end=+)+  contained
 
 "HTML headings
-syn region htmlH1       start="^\s*#"                   end="$" contains=mkdLink,mkdInlineURL,@Spell
-syn region htmlH2       start="^\s*##"                  end="$" contains=mkdLink,mkdInlineURL,@Spell
-syn region htmlH3       start="^\s*###"                 end="$" contains=mkdLink,mkdInlineURL,@Spell
-syn region htmlH4       start="^\s*####"                end="$" contains=mkdLink,mkdInlineURL,@Spell
-syn region htmlH5       start="^\s*#####"               end="$" contains=mkdLink,mkdInlineURL,@Spell
-syn region htmlH6       start="^\s*######"              end="$" contains=mkdLink,mkdInlineURL,@Spell
+syn region htmlH1       matchgroup=mkdHeading     start="^\s*#"                   end="$" contains=mkdLink,mkdInlineURL,@Spell
+syn region htmlH2       matchgroup=mkdHeading     start="^\s*##"                  end="$" contains=mkdLink,mkdInlineURL,@Spell
+syn region htmlH3       matchgroup=mkdHeading     start="^\s*###"                 end="$" contains=mkdLink,mkdInlineURL,@Spell
+syn region htmlH4       matchgroup=mkdHeading     start="^\s*####"                end="$" contains=mkdLink,mkdInlineURL,@Spell
+syn region htmlH5       matchgroup=mkdHeading     start="^\s*#####"               end="$" contains=mkdLink,mkdInlineURL,@Spell
+syn region htmlH6       matchgroup=mkdHeading     start="^\s*######"              end="$" contains=mkdLink,mkdInlineURL,@Spell
 syn match  htmlH1       /^.\+\n=\+$/ contains=mkdLink,mkdInlineURL,@Spell
 syn match  htmlH2       /^.\+\n-\+$/ contains=mkdLink,mkdInlineURL,@Spell
 
 "define Markdown groups
 syn match  mkdLineBreak    /  \+$/
 syn region mkdBlockquote   start=/^\s*>/                   end=/$/ contains=mkdLink,mkdInlineURL,mkdLineBreak,@Spell
-syn region mkdCode         start=/\(\([^\\]\|^\)\\\)\@<!`/ end=/\(\([^\\]\|^\)\\\)\@<!`/
-syn region mkdCode         start=/\s*``[^`]*/              end=/[^`]*``\s*/
-syn region mkdCode         start=/^\s*\z(`\{3,}\)[^`]*$/   end=/^\s*\z1`*\s*$/
-syn region mkdCode         start=/\s*\~\~[^\~]*/           end=/[^\~]*\~\~\s*/
-syn region mkdCode         start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/         end=/^\s*\z1\~*\s*$/
-syn region mkdCode         start="<pre[^>]*\\\@<!>"        end="</pre>"
-syn region mkdCode         start="<code[^>]*\\\@<!>"       end="</code>"
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!`/                     end=/\(\([^\\]\|^\)\\\)\@<!`/'  . s:concealcode
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!``/ skip=/[^`]`[^`]/   end=/\(\([^\\]\|^\)\\\)\@<!``/' . s:concealcode
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(`\{3,}\)[^`]*$/                       end=/^\s*\z1`*\s*$/'            . s:concealcode
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!\~\~/  end=/\(\([^\\]\|^\)\\\)\@<!\~\~/'               . s:concealcode
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/      end=/^\s*\z1\~*\s*$/'           . s:concealcode
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<pre[^>]*\\\@<!>"                            end="</pre>"'                   . s:concealcode
+execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<code[^>]*\\\@<!>"                           end="</code>"'                  . s:concealcode
 syn region mkdFootnote     start="\[^"                     end="\]"
 syn match  mkdCode         /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/
 syn match  mkdCode         /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
@@ -115,7 +119,7 @@ syn match  mkdRule         /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/
 " YAML frontmatter
 if get(g:, 'vim_markdown_frontmatter', 0)
   syn include @yamlTop syntax/yaml.vim
-  syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^---$" contains=@yamlTop keepend
+  syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^\(---\|\.\.\.\)$" contains=@yamlTop keepend
   unlet! b:current_syntax
 endif
 
@@ -156,6 +160,7 @@ syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic,
 "highlighting for Markdown groups
 HtmlHiLink mkdString        String
 HtmlHiLink mkdCode          String
+HtmlHiLink mkdCodeDelimiter String
 HtmlHiLink mkdCodeStart     String
 HtmlHiLink mkdCodeEnd       String
 HtmlHiLink mkdFootnote      Comment
index 0adae58a586e5a19801e5ba868a0e7086e666456..fdf9c0be4dac25a3babd4ab3bbb9c8d52482aca2 100644 (file)
@@ -1139,19 +1139,19 @@ Given markdown;
 ###### h6
 
 Execute (atx headers):
-  AssertEqual SyntaxOf('# h1 space'), 'htmlH1'
-  AssertEqual SyntaxOf('#h1 nospace'), 'htmlH1'
-  AssertEqual SyntaxOf('#  h1 2 spaces'), 'htmlH1'
-  AssertEqual SyntaxOf('# h1 trailing hash #'), 'htmlH1'
-  AssertEqual SyntaxOf('## h2 space'), 'htmlH2'
-  AssertEqual SyntaxOf('##h2 nospace'), 'htmlH2'
-  AssertEqual SyntaxOf('## h2 trailing hash ##'), 'htmlH2'
-  AssertEqual SyntaxOf('### h3 space'), 'htmlH3'
-  AssertEqual SyntaxOf('###h3 nospace'), 'htmlH3'
-  AssertEqual SyntaxOf('### h3 trailing hash ###'), 'htmlH3'
-  AssertEqual SyntaxOf('#### h4'), 'htmlH4'
-  AssertEqual SyntaxOf('##### h5'), 'htmlH5'
-  AssertEqual SyntaxOf('###### h6'), 'htmlH6'
+  AssertEqual SyntaxOf(' h1 space'), 'htmlH1'
+  AssertEqual SyntaxOf('h1 nospace'), 'htmlH1'
+  AssertEqual SyntaxOf('  h1 2 spaces'), 'htmlH1'
+  AssertEqual SyntaxOf(' h1 trailing hash '), 'htmlH1'
+  AssertEqual SyntaxOf(' h2 space'), 'htmlH2'
+  AssertEqual SyntaxOf('h2 nospace'), 'htmlH2'
+  AssertEqual SyntaxOf(' h2 trailing hash '), 'htmlH2'
+  AssertEqual SyntaxOf(' h3 space'), 'htmlH3'
+  AssertEqual SyntaxOf('h3 nospace'), 'htmlH3'
+  AssertEqual SyntaxOf(' h3 trailing hash '), 'htmlH3'
+  AssertEqual SyntaxOf(' h4'), 'htmlH4'
+  AssertEqual SyntaxOf(' h5'), 'htmlH5'
+  AssertEqual SyntaxOf(' h6'), 'htmlH6'
 
 Given markdown;
 # h1 before h2
@@ -1161,9 +1161,9 @@ Given markdown;
 # h1 after h2
 
 Execute (atx headers relative positions):
-  AssertEqual SyntaxOf('# h1 before h2'), 'htmlH1'
-  AssertEqual SyntaxOf('## h2 between h1s'), 'htmlH2'
-  AssertEqual SyntaxOf('# h1 after h2'), 'htmlH1'
+  AssertEqual SyntaxOf(' h1 before h2'), 'htmlH1'
+  AssertEqual SyntaxOf(' h2 between h1s'), 'htmlH2'
+  AssertEqual SyntaxOf(' h1 after h2'), 'htmlH1'
 
 Given markdown;
 setex h1
@@ -1214,9 +1214,9 @@ setex h2
 Execute (mixed atx and setex headers):
   AssertEqual SyntaxOf('setex h1 before atx'), 'htmlH1'
   AssertEqual SyntaxOf('==================='), 'htmlH1'
-  AssertEqual SyntaxOf('## atx h2'), 'htmlH2'
-  AssertEqual SyntaxOf('### atx h3'), 'htmlH3'
-  AssertEqual SyntaxOf('# atx h1'), 'htmlH1'
+  AssertEqual SyntaxOf(' atx h2'), 'htmlH2'
+  AssertEqual SyntaxOf(' atx h3'), 'htmlH3'
+  AssertEqual SyntaxOf(' atx h1'), 'htmlH1'
   AssertEqual SyntaxOf('setex h2'), 'htmlH2'
   AssertEqual SyntaxOf('------------------'), 'htmlH2'