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