MCPcopy Index your code
hub / github.com/TruthHun/BookStack / createStyleRule

Function createStyleRule

static/word2md/mammoth.browser.js:2693–2709  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2691}
2692
2693function createStyleRule() {
2694 return lop.rules.sequence(
2695 lop.rules.sequence.capture(documentMatcherRule()),
2696 lop.rules.tokenOfType("whitespace"),
2697 lop.rules.tokenOfType("arrow"),
2698 lop.rules.sequence.capture(lop.rules.optional(lop.rules.sequence(
2699 lop.rules.tokenOfType("whitespace"),
2700 lop.rules.sequence.capture(htmlPathRule())
2701 ).head())),
2702 lop.rules.tokenOfType("end")
2703 ).map(function(documentMatcher, htmlPath) {
2704 return {
2705 from: documentMatcher,
2706 to: htmlPath.valueOrElse(htmlPaths.empty)
2707 };
2708 });
2709}
2710
2711function readDocumentMatcher(string) {
2712 return parseString(documentMatcherRule(), string);

Callers 1

mammoth.browser.jsFile · 0.70

Calls 2

documentMatcherRuleFunction · 0.70
htmlPathRuleFunction · 0.70

Tested by

no test coverage detected