" Language: HTML
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
-" Last Change: 2024 Jan 14
-" 2024 May 24 update 'commentstring' option
-" 2025 May 10 add expression folding #17141
+" Last Change: 2025 Sep 12
if exists("b:did_ftplugin")
finish
setlocal commentstring=<!--\ %s\ -->
setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
-let b:undo_ftplugin = "setlocal comments< commentstring< matchpairs<"
+if exists('b:undo_ftplugin')
+ " no whitespace before |, handle possible :unmap at end of current value
+ let b:undo_ftplugin ..= "| setlocal comments< commentstring< matchpairs<"
+else
+ let b:undo_ftplugin = "setlocal comments< commentstring< matchpairs<"
+endif
if get(g:, "ft_html_autocomment", 0)
setlocal formatoptions-=t formatoptions+=croql