Skip to content

Commit 3404e83

Browse files
authored
Merge pull request #131 from vim-jp/tag-aliases
Support tag aliases (Fix #124)
2 parents 6c9f524 + 9b58d22 commit 3404e83

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

tools/buildhtml.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ let g:html_no_progress = 1
88

99
enew!
1010

11+
source <sfile>:h/tag_aliases.vim
1112
source <sfile>:h/untranslated.vim
1213
source <sfile>:h/makehtml.vim
1314

tools/makehtml.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ function! s:MakeLink(lang, hlname, tagname, conceal)
170170
endif
171171
endif
172172
let tags = s:GetTags(a:lang)
173+
if !has_key(tags, tagname) && has_key(g:makehtml_tag_aliases, tagname)
174+
let tagname = g:makehtml_tag_aliases[tagname]
175+
endif
173176
if has_key(tags, tagname)
174177
let href = tags[tagname]["html"]
175178
if tagname !~ '\.txt$' && tagname != "help-tags"

tools/tag_aliases.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let g:makehtml_tag_aliases = {
2+
\ '=~': 'expr-=~',
3+
\ }

0 commit comments

Comments
 (0)