1diff --git a/bin/quarto.js b/bin/quarto.js 2@@ -97360,6 +97360,7 @@ 3 class SAXParser extends ParserBase { 4 _listeners = {}; 5 _controller; 6+ _encoding; 7 fireListeners(event) { 8 const [name, ...args] = event; 9 const list = this._listeners[name] || []; 10@@ -97395,33 +97396,23 @@ 11 write(chunk, controller) { 12 try { 13 this._controller = controller; 14- this.chunk = new TextDecoder().decode(chunk); 15+ this.chunk = new TextDecoder(this._encoding).decode(chunk); 16 this.run(); 17 } finally{ 18 this._controller = undefined; 19 } 20 } 21- getStream() { 22- return new WritableStream(this); 23- } 24- getWriter() { 25- const streamWriter = this.getStream().getWriter(); 26- return { 27- async write (p) { 28- await streamWriter.ready; 29- await streamWriter.write(p); 30- return p.length; 31- } 32- }; 33- } 34- async parse(source) { 35+ async parse(source, encoding) { 36+ this._encoding = encoding; 37 if (typeof source === 'string') { 38 this.chunk = source; 39 this.run(); 40 } else if (source instanceof Uint8Array) { 41 this.write(source); 42 } else { 43- await Deno.copy(source, this.getWriter()); 44+ await source.pipeThrough(new TextDecoderStream(this._encoding)).pipeTo(new WritableStream({ 45+ write: (str)=>this.parse(str, encoding) 46+ })); 47 } 48 } 49 on(event, listener) { 50@@ -97532,8 +97523,7 @@ 51 } 52 }); 53 const reader = await Deno.open(sitemapPath); 54- await parser.parse(reader); 55- reader.close(); 56+ await parser.parse(reader.readable); 57 return urlset; 58 } 59 function writeSitemap(sitemapPath, urlset, draftMode) {