File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -703,16 +703,11 @@ export async function runPandoc(
703703 // timing results json file
704704 const timingResultsFile = options . services . temp . createFile ( ) ;
705705
706- if ( allDefaults . to ?. match ( / [ . ] l u a $ / ) ) {
707- formatFilterParams [ "custom-writer" ] = allDefaults . to ;
708- allDefaults . to = resourcePath ( "filters/customwriter/customwriter.lua" ) ;
709- }
710- if ( Deno . env . get ( "QUARTO_ALLENMANNING_WORKAROUND_CONFLUENCE" ) === undefined ) {
711- if ( allDefaults . writer ?. match ( / [ . ] l u a $ / ) ) {
712- formatFilterParams [ "custom-writer" ] = allDefaults . writer ;
713- allDefaults . writer = resourcePath (
714- "filters/customwriter/customwriter.lua" ,
715- ) ;
706+ const writerKeys : ( "to" | "writer" ) [ ] = [ "to" , "writer" ] ;
707+ for ( const key of writerKeys ) {
708+ if ( allDefaults [ key ] ?. match ( / [ . ] l u a $ / ) ) {
709+ formatFilterParams [ "custom-writer" ] = allDefaults [ key ] ;
710+ allDefaults [ key ] = resourcePath ( "filters/customwriter/customwriter.lua" ) ;
716711 }
717712 }
718713
You can’t perform that action at this time.
0 commit comments