@@ -13,7 +13,7 @@ export const schema = z.array(
1313 fileName : z . string ( ) ,
1414 typeOfFile : TypeOfFileSchema ,
1515 markdown : z . string ( ) ,
16- isMilkdown : z . boolean ( ) . optional ( ) ,
16+ implicitFigures : z . boolean ( ) . optional ( ) ,
1717 } )
1818) ;
1919
@@ -57,12 +57,11 @@ export const handler = async function (
5757 pandocArgs : string [ ] ,
5858 destFilePath : string ,
5959 markdown : string ,
60- isMilkdown : boolean = true
60+ implicitFigures : boolean = false
6161 ) => {
6262 // pandoc source format
63- // If Milkdown, disable the implicit_figures extension to remove all image captions
64- const fromString = isMilkdown ? "markdown-implicit_figures" : "markdown+implicit_figures" ;
65- // const fromString = "markdown+implicit_figures";
63+ // If implicitFigures, enable the implicit_figures extension and add image captions
64+ const fromString = implicitFigures ? "markdown+implicit_figures" : "markdown-implicit_figures" ;
6665
6766 try {
6867 await pdcTs . Execute ( {
@@ -137,7 +136,7 @@ export const handler = async function (
137136 let url = "" ;
138137 for ( let eachRequestData of requestData ) {
139138 const markdown = eachRequestData . markdown ;
140- const isMilkdown = eachRequestData . isMilkdown ;
139+ const implicitFigures = eachRequestData . implicitFigures ;
141140
142141 switch ( eachRequestData . typeOfFile ) {
143142 case "PDF" :
@@ -147,7 +146,7 @@ export const handler = async function (
147146 [ "--pdf-engine=xelatex" , `--template=./template.latex` ] ,
148147 localPathPDF ,
149148 markdown ,
150- isMilkdown
149+ implicitFigures
151150 ) ;
152151
153152 if ( generatePDFResult ?. statusCode ) {
@@ -164,7 +163,7 @@ export const handler = async function (
164163 [ `--template=./template.latex` ] ,
165164 localPathTEX ,
166165 markdown ,
167- isMilkdown
166+ implicitFigures
168167 ) ;
169168
170169 const s3PathTEX = `${ eachRequestData . userId } /${ filenameTEX } ` ;
0 commit comments