MCPcopy Create free account
hub / github.com/TruthHun/BookStack / end

Function end

static/word2md/mammoth.browser.js:26599–26612  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

26597 }
26598
26599 function end (parser) {
26600 if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')
26601 if ((parser.state !== S.BEGIN) &&
26602 (parser.state !== S.BEGIN_WHITESPACE) &&
26603 (parser.state !== S.TEXT)) {
26604 error(parser, 'Unexpected end')
26605 }
26606 closeText(parser)
26607 parser.c = ''
26608 parser.closed = true
26609 emit(parser, 'onend')
26610 SAXParser.call(parser, parser.strict, parser.opt)
26611 return parser
26612 }
26613
26614 function strictFail (parser, message) {
26615 if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {

Callers 2

mammoth.browser.jsFile · 0.70
writeFunction · 0.70

Calls 4

strictFailFunction · 0.70
errorFunction · 0.70
closeTextFunction · 0.70
emitFunction · 0.70

Tested by

no test coverage detected