mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-25 07:25:13 +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": {
|
"scripts": {
|
||||||
"build": "npm run tsc && npm run peg",
|
"build": "npm run tsc && npm run peg",
|
||||||
"build-debug": "npm run tsc && npm run peg-debug",
|
"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": "peggy --cache -o built/internal/parser.js --allowed-start-rules fullParser,inlineParser,plainParser src/internal/parser.pegjs",
|
||||||
"peg-debug": "peggy --cache -o built/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/parser.pegjs",
|
"peg-debug": "peggy --cache -o built/internal/parser.js --allowed-start-rules fullParser,inlineParser,plainParser --trace src/internal/parser.pegjs",
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"tsd": "tsd",
|
"tsd": "tsd",
|
||||||
"parse": "node ./built/cli/parse",
|
"parse": "node ./built/cli/parse",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import peg from 'peggy';
|
import peg from 'peggy';
|
||||||
import { MfmNode, MfmPlainNode } from './node';
|
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.
|
* Generates a MfmNode tree from the MFM string.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
LINK,
|
LINK,
|
||||||
FN,
|
FN,
|
||||||
TEXT
|
TEXT
|
||||||
} = require('./node');
|
} = require('../node');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
mergeText,
|
mergeText,
|
|
@ -1,4 +1,4 @@
|
||||||
import { isMfmBlock, MfmNode, TEXT } from './node';
|
import { isMfmBlock, MfmNode, TEXT } from '../node';
|
||||||
|
|
||||||
export function mergeText(nodes: (MfmNode | string)[]): MfmNode[] {
|
export function mergeText(nodes: (MfmNode | string)[]): MfmNode[] {
|
||||||
const dest: MfmNode[] = [];
|
const dest: MfmNode[] = [];
|
Loading…
Reference in a new issue