Skip to content

Commit

Permalink
Fix handling of multiline comments inside macro definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ayourtch committed Aug 17, 2016
1 parent bc6c5a0 commit 899d180
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lcpp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ local function removeComments(input)
for k, v, start, end_ in tokenizer(input, LCPP_TOKENIZE_COMMENT) do
if k == "MLCOMMENT" then
local newlineCount = findn(input:sub(start, end_), "\n")
local newlines = string.rep("\n", newlineCount)
local newlines = string.rep("\\\n", newlineCount)
table.insert(out, newlines)
elseif k == "SLCOMMENT" then
table.insert(out, "\n")
Expand Down

0 comments on commit 899d180

Please sign in to comment.