Skip to content
This repository was archived by the owner on Mar 1, 2022. It is now read-only.

Commit af44edc

Browse files
committed
properly unescape strings with new libdparse API
1 parent 1cc2f50 commit af44edc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/workspaced/dparseext.d

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ void foo()
172172
string evaluateExpressionString(const PrimaryExpression expr)
173173
in (expr !is null)
174174
{
175+
import dparse.strings : unescapeString;
176+
175177
switch (expr.primary.type)
176178
{
177179
case tok!"stringLiteral":
@@ -195,7 +197,7 @@ in (expr !is null)
195197
case tok!"stringLiteral":
196198
case tok!"wstringLiteral":
197199
case tok!"dstringLiteral":
198-
ret ~= t.text;
200+
ret ~= unescapeString(t.text);
199201
break;
200202
default:
201203
// unexpected token, return input because it might already be

0 commit comments

Comments
 (0)