summaryrefslogtreecommitdiff
path: root/tex/context/base/lpdf-wid.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lpdf-wid.lua')
-rw-r--r--tex/context/base/lpdf-wid.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua
index 0d96d8086..1ca41ed7c 100644
--- a/tex/context/base/lpdf-wid.lua
+++ b/tex/context/base/lpdf-wid.lua
@@ -122,7 +122,8 @@ end
function codeinjections.registercomment(specification)
nofcomments = nofcomments + 1
local text = buffers.collectcontent(specification.buffer)
- if stripleading then
+ text = string.strip(text)
+ if stripleading then -- maybe just strip all leading and trailing spacing
text = gsub(text,"[\n\r] *","\n")
end
local name, appearance = analyzesymbol(specification.symbol)