diff --git a/data/sample.lua b/data/sample.lua
index 5752d2684..b87848378 100644
--- a/data/sample.lua
+++ b/data/sample.lua
@@ -21,7 +21,7 @@ local stringify = (require "pandoc.utils").stringify
-- configure the writer.
local meta = PANDOC_DOCUMENT.meta
--- Chose the image format based on the value of the
+-- Choose the image format based on the value of the
-- `image_format` meta value.
local image_format = meta.image_format
and stringify(meta.image_format)
@@ -45,9 +45,9 @@ local function escape(s, in_attribute)
return '>'
elseif x == '&' then
return '&'
- elseif x == '"' then
+ elseif in_attribute and x == '"' then
return '"'
- elseif x == "'" then
+ elseif in_attribute and x == "'" then
return '''
else
return x
@@ -141,8 +141,8 @@ function Strikeout(s)
return '' .. s .. ''
end
-function Link(s, src, tit, attr)
- return "" .. s .. ""
end
@@ -271,7 +271,7 @@ end
-- Convert pandoc alignment to something HTML can use.
-- align is AlignLeft, AlignRight, AlignCenter, or AlignDefault.
-function html_align(align)
+local function html_align(align)
if align == 'AlignLeft' then
return 'left'
elseif align == 'AlignRight' then
@@ -286,7 +286,7 @@ end
function CaptionedImage(src, tit, caption, attr)
return '
' .. caption .. '
\n' .. escape(caption) .. '
\n' end -- Caption is a string, aligns is an array of strings, @@ -357,4 +357,3 @@ meta.__index = return function() return "" end end setmetatable(_G, meta) -