summaryrefslogtreecommitdiff
path: root/packages/astro-parser/src/parse/state
diff options
context:
space:
mode:
authorGravatar Carter Snook <cartersnook04@gmail.com> 2021-07-20 14:18:42 -0500
committerGravatar GitHub <noreply@github.com> 2021-07-20 12:18:42 -0700
commit268186c27d436dd4fe6a330af8790ceeaeb6492c (patch)
tree9963a60461f3b892ddf34ecd3bea58bbb3afae70 /packages/astro-parser/src/parse/state
parentd6a9afb8e186a0481dc9d8a37e682958471dd8e7 (diff)
downloadastro-268186c27d436dd4fe6a330af8790ceeaeb6492c.tar.gz
astro-268186c27d436dd4fe6a330af8790ceeaeb6492c.tar.zst
astro-268186c27d436dd4fe6a330af8790ceeaeb6492c.zip
fix(parser): html entities evaluated (#738)
Diffstat (limited to 'packages/astro-parser/src/parse/state')
-rw-r--r--packages/astro-parser/src/parse/state/tag.ts4
-rw-r--r--packages/astro-parser/src/parse/state/text.ts3
2 files changed, 3 insertions, 4 deletions
diff --git a/packages/astro-parser/src/parse/state/tag.ts b/packages/astro-parser/src/parse/state/tag.ts
index 70fa9e361..f3d30b06d 100644
--- a/packages/astro-parser/src/parse/state/tag.ts
+++ b/packages/astro-parser/src/parse/state/tag.ts
@@ -2,7 +2,7 @@
import read_expression from '../read/expression.js';
import read_style from '../read/style.js';
-import { decode_character_references, closing_tag_omitted } from '../utils/html.js';
+import { closing_tag_omitted } from '../utils/html.js';
import { is_void } from '../../utils/names.js';
import { Parser } from '../index.js';
import { Directive, DirectiveType, TemplateNode, Text } from '../../interfaces.js';
@@ -533,7 +533,7 @@ export function read_sequence(parser: Parser, done: () => boolean): TemplateNode
function flush() {
if (current_chunk.raw) {
- current_chunk.data = decode_character_references(current_chunk.raw);
+ current_chunk.data = current_chunk.raw;
current_chunk.end = parser.index;
chunks.push(current_chunk);
}
diff --git a/packages/astro-parser/src/parse/state/text.ts b/packages/astro-parser/src/parse/state/text.ts
index 020d066fd..dec284ae4 100644
--- a/packages/astro-parser/src/parse/state/text.ts
+++ b/packages/astro-parser/src/parse/state/text.ts
@@ -1,6 +1,5 @@
// @ts-nocheck
-import { decode_character_references } from '../utils/html.js';
import { Parser } from '../index.js';
export default function text(parser: Parser) {
@@ -25,7 +24,7 @@ export default function text(parser: Parser) {
end: parser.index,
type: 'Text',
raw: data,
- data: decode_character_references(data),
+ data,
};
parser.current().children.push(node);