diff options
author | 2022-03-21 14:30:23 -0300 | |
---|---|---|
committer | 2022-03-21 12:30:23 -0500 | |
commit | 41110ebe729d088a3f6b8ea1e42103a171e36a22 (patch) | |
tree | 969f985e89f6c739d00471ed8dfa68412595a1a9 /packages/astro-parser/src/parse/state/fragment.ts | |
parent | 0c5378b8cf4fcf4a7b4e6c9e33f0ba9c370990f3 (diff) | |
download | astro-41110ebe729d088a3f6b8ea1e42103a171e36a22.tar.gz astro-41110ebe729d088a3f6b8ea1e42103a171e36a22.tar.zst astro-41110ebe729d088a3f6b8ea1e42103a171e36a22.zip |
chore: remove `@astrojs/parser` (#2845)
* Removed parser from astro
* Removed parser files
* Updated changeset config
* Removed from license
Diffstat (limited to 'packages/astro-parser/src/parse/state/fragment.ts')
-rw-r--r-- | packages/astro-parser/src/parse/state/fragment.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/packages/astro-parser/src/parse/state/fragment.ts b/packages/astro-parser/src/parse/state/fragment.ts deleted file mode 100644 index fc8874a19..000000000 --- a/packages/astro-parser/src/parse/state/fragment.ts +++ /dev/null @@ -1,32 +0,0 @@ -import tag from './tag.js'; -import setup from './setup.js'; -import mustache from './mustache.js'; -import text from './text.js'; -import codefence from './codefence.js'; -import codespan from './codespan.js'; -import { Parser } from '../index.js'; - -export default function fragment(parser: Parser) { - if (parser.html.children.length === 0 && parser.match_regex(/^---/m)) { - return setup; - } - - // Fenced code blocks are pretty complex in the GFM spec - // https://github.github.com/gfm/#fenced-code-blocks - if (parser.match_regex(/[`~]{3,}/)) { - return codefence; - } - if (parser.match_regex(/(?<!\\)`{1,2}/)) { - return codespan; - } - - if (parser.match('<')) { - return tag; - } - - if (parser.match('{')) { - return mustache; - } - - return text; -} |