mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-21 21:55:09 +00:00
move the parser to the internal dir
This commit is contained in:
parent
07f6d94e4e
commit
0733b1e06f
4 changed files with 6 additions and 6 deletions
|
@ -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",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
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,
|
|
@ -1,4 +1,4 @@
|
|||
import { isMfmBlock, MfmNode, TEXT } from './node';
|
||||
import { isMfmBlock, MfmNode, TEXT } from '../node';
|
||||
|
||||
export function mergeText(nodes: (MfmNode | string)[]): MfmNode[] {
|
||||
const dest: MfmNode[] = [];
|
Loading…
Reference in a new issue