Skip to content

Commit

Permalink
fix(sax-wasm): Remove obsolete 'options' parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomByte committed Jan 3, 2025
1 parent 3c07141 commit 925a577
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/linter/xmlTemplate/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ async function transpileXmlToJs(
const parser = new Parser(resourcePath, apiExtract, context, controllerByIdInfo);

// Initialize parser
const options = {highWaterMark: 32 * 1024}; // 32k chunks
const saxParser = new SAXParser(
SaxEventType.OpenTag | SaxEventType.CloseTag,
options);
const saxParser = new SAXParser(SaxEventType.OpenTag | SaxEventType.CloseTag);

saxParser.eventHandler = (event, tag) => {
if (tag instanceof SaxTag) {
Expand Down
3 changes: 1 addition & 2 deletions src/utils/xmlParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ async function initSaxWasm() {
}

export async function parseXML(contentStream: ReadStream, parseHandler: (type: SaxEventType, tag: Detail) => void) {
const options = {highWaterMark: 32 * 1024}; // 32k chunks
const saxWasmBuffer = await initSaxWasm();
const saxParser = new SAXParser(SaxEventType.CloseTag + SaxEventType.OpenTag, options);
const saxParser = new SAXParser(SaxEventType.CloseTag + SaxEventType.OpenTag);

saxParser.eventHandler = parseHandler;

Expand Down

0 comments on commit 925a577

Please sign in to comment.