Skip to content
Snippets Groups Projects
Commit 0733b1e0 authored by marihachi's avatar marihachi
Browse files

move the parser to the internal dir

parent 07f6d94e
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,8 @@
"scripts": {
"build": "npm run tsc && npm run peg",
"build-debug": "npm run tsc && npm run peg-debug",
"peg": "peggy --cache -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser src/parser.pegjs",
"peg-debug": "peggy --cache -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/parser.pegjs",
"peg": "peggy --cache -o built/internal/parser.js --allowed-start-rules fullParser,inlineParser,plainParser src/internal/parser.pegjs",
"peg-debug": "peggy --cache -o built/internal/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/internal/parser.pegjs",
"tsc": "tsc",
"tsd": "tsd",
"parse": "node ./built/cli/parse",
......
import peg from 'peggy';
import { MfmNode, MfmPlainNode } from './node';
import { stringifyNode, stringifyTree, inspectOne } from './util';
import { stringifyNode, stringifyTree, inspectOne } from './internal/util';
const parser: peg.Parser = require('./parser');
const parser: peg.Parser = require('./internal/parser');
/**
* Generates a MfmNode tree from the MFM string.
......
......@@ -22,7 +22,7 @@
LINK,
FN,
TEXT
} = require('./node');
} = require('../node');
const {
mergeText,
......
import { isMfmBlock, MfmNode, TEXT } from './node';
import { isMfmBlock, MfmNode, TEXT } from '../node';
export function mergeText(nodes: (MfmNode | string)[]): MfmNode[] {
const dest: MfmNode[] = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment