Check if there is a parser before renaming tag

Make sure a parser is available before trying to rename tag.
This commit is contained in:
Dave Lage 2022-02-22 11:41:38 -05:00 committed by windwp
parent 5149f0c655
commit cfe8018b10

View File

@ -400,7 +400,7 @@ local function validate_rename()
end
M.rename_tag = function ()
if validate_rename() then
if validate_rename() and parsers.has_parser() then
parsers.get_parser():parse()
rename_start_tag()
rename_end_tag()