aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/lua/tohtml.lua1
-rw-r--r--test/functional/plugin/tohtml_spec.lua2
2 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/tohtml.lua b/runtime/lua/tohtml.lua
index 6b8daab2c5..80892f5c60 100644
--- a/runtime/lua/tohtml.lua
+++ b/runtime/lua/tohtml.lua
@@ -1372,6 +1372,7 @@ local function win_to_html(winid, opt)
state_generate_style(state)
local html = {}
+ table.insert(html, '<!-- vim: set nomodeline: -->')
extend_html(html, function()
extend_head(html, global_state)
extend_body(html, function()
diff --git a/test/functional/plugin/tohtml_spec.lua b/test/functional/plugin/tohtml_spec.lua
index afd4169006..0cc199609c 100644
--- a/test/functional/plugin/tohtml_spec.lua
+++ b/test/functional/plugin/tohtml_spec.lua
@@ -159,6 +159,7 @@ local function test_generates_html(guifont, expect_font)
local out_file = api.nvim_buf_get_name(api.nvim_get_current_buf())
eq({
+ '<!-- vim: set nomodeline: -->',
'<!DOCTYPE html>',
'<html>',
'<head>',
@@ -212,6 +213,7 @@ describe(':TOhtml', function()
n.command('2,2TOhtml')
local out_file = api.nvim_buf_get_name(api.nvim_get_current_buf())
eq({
+ '<!-- vim: set nomodeline: -->',
'<!DOCTYPE html>',
'<html>',
'<head>',