in packages/docpack-jsdoc-extractor/lib/parseXMLExamples.js [68:108]
parser.onclosetag = function (nodeName) {
var tagContent;
if (nodeName === EXAMPLE_TAG && exampleNode) {
tagContent = getTagContent(
exampleContentStartPosition,
parser.position,
EXAMPLE_START_REGEXP
);
examples.push(new Example({
content: stripIndent(tagContent),
attrs: exampleNode.attributes,
files: files
}));
stopFileParsing();
stopExampleParsing();
}
if (nodeName === FILE_TAG && exampleNode && fileNode) {
tagContent = getTagContent(
fileContentStartPosition,
parser.position,
TAG_START_REGEXP
);
if (tagContent == null) {
stopFileParsing();
return;
}
files.push(new ExampleFile({
type: fileNode.attributes.type || 'js',
content: stripIndent(tagContent),
attrs: fileNode.attributes
}));
stopFileParsing();
}
};