Skip to content

Commit

Permalink
Stop removing heading hashes (#) to know heading level
Browse files Browse the repository at this point in the history
  • Loading branch information
KSR-Yasuda committed Sep 28, 2022
1 parent c0211c3 commit dcaddcc
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ftplugin/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,6 @@ function! s:GetHeaderList()
let l:is_header = 0
endif
if l:is_header ==# 1 && l:fenced_block ==# 0 && l:front_matter ==# 0
" remove hashes from atx headers
if match(l:line, '^#') > -1
let l:line = substitute(l:line, '\v^#*[ ]*', '', '')
let l:line = substitute(l:line, '\v[ ]*#*$', '', '')
endif
" append line to list
let l:level = s:GetHeaderLevel(i)
let l:item = {'level': l:level, 'text': l:line, 'lnum': i, 'bufnr': bufnr}
Expand Down

0 comments on commit dcaddcc

Please sign in to comment.