From eaeb4b7df8e515e39f907e04a9ef0f71a6a5fcae Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 18 Jan 2021 15:32:51 +0100 Subject: [PATCH] Use source position within templates, now that StringScanner is fixed --- packages/core/src/syntax/template.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/syntax/template.ts b/packages/core/src/syntax/template.ts index 8a57bbd..14be93b 100644 --- a/packages/core/src/syntax/template.ts +++ b/packages/core/src/syntax/template.ts @@ -10,7 +10,7 @@ const substPat = M.scope((o: { pos: Pos }) => export type Substitution = Items | string; function toItems(s: Substitution, pos: Pos): Items { - return typeof s === 'string' ? laxRead(s) : s; + return typeof s === 'string' ? laxRead(s, { start: pos }) : s; } export class Templates {