mirror of https://github.com/sveltejs/svelte
parent
a5f86c2cb4
commit
3ddb4f6e20
@ -1,10 +1,10 @@
|
|||||||
import { Parser } from "../index";
|
import { Parser } from '../index';
|
||||||
import mustache from "./mustache";
|
import mustache from './mustache';
|
||||||
import tag from "./tag";
|
import tag from './tag';
|
||||||
import text from "./text";
|
import text from './text';
|
||||||
|
|
||||||
export default (parser: Parser) =>
|
export default (parser: Parser) =>
|
||||||
[
|
[
|
||||||
{ match: "<", fragment: tag },
|
{ match: '<', fragment: tag },
|
||||||
{ match: "{", fragment: mustache },
|
{ match: '{', fragment: mustache }
|
||||||
].find(({ match }) => parser.match(match))?.fragment ?? text;
|
].find(({ match }) => parser.match(match))?.fragment ?? text;
|
||||||
|
|||||||
Loading…
Reference in new issue