File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ import { handleHttpRequests } from "../../core/http-server.ts";
119119import { touch } from "../../core/file.ts" ;
120120import { staticResource } from "../../preview/preview-static.ts" ;
121121import { previewTextContent } from "../../preview/preview-text.ts" ;
122+ import { kManuscriptType } from "../types/manuscript/manuscript-types.ts" ;
122123
123124export const kRenderNone = "none" ;
124125export const kRenderDefault = "default" ;
@@ -474,10 +475,16 @@ async function internalPreviewServer(
474475 const pdfOutputFile = ( finalOutput && pdfOutput )
475476 ? ( ) : string => {
476477 const project = watcher . project ( ) ;
477- return join (
478- dirname ( finalOutput ) ,
479- bookOutputStem ( project . dir , project . config ) + ".pdf" ,
480- ) ;
478+ if ( projType . type == kManuscriptType ) {
479+ // For manuscripts, just use the final output as is
480+ return finalOutput ;
481+ } else {
482+ const outputFile = join (
483+ dirname ( finalOutput ) ,
484+ bookOutputStem ( project . dir , project . config ) + ".pdf" ,
485+ ) ;
486+ return outputFile ;
487+ }
481488 }
482489 : undefined ;
483490
You can’t perform that action at this time.
0 commit comments