Skip to content

Commit

Permalink
Allow qmd embed targetting from efficient manuscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle committed Jul 14, 2023
1 parent 2c84af8 commit c8665b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/project/types/manuscript/manuscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
kClearHiddenClasses,
kEcho,
kFormatLinks,
kIpynbProduceSourceNotebook,
kKeepHidden,
kLanguageDefaults,
kManuscriptMecaBundle,
Expand Down Expand Up @@ -71,6 +72,7 @@ import { readLines } from "io/mod.ts";
import { isOutputFile } from "../../../command/render/output.ts";
import {
computeProjectArticleFile,
isArticle,
isArticleManuscript,
} from "./manuscript-config.ts";
import { InternalError } from "../../../core/lib/error.ts";
Expand All @@ -87,6 +89,7 @@ import { outputFile } from "../../../render/notebook/notebook-contributor-html.t
import { Document } from "../../../core/deno-dom.ts";
import { kHtmlEmptyPostProcessResult } from "../../../command/render/constants.ts";
import { resolveProjectInputLinks } from "../project-utilities.ts";
import { isQmdFile } from "../../../execute/qmd.ts";

const kMecaIcon = "archive";
const kOutputDir = "_manuscript";
Expand Down Expand Up @@ -395,6 +398,10 @@ export const manuscriptProjectType: ProjectType = {
format.execute.warning = false;
format.render[kKeepHidden] = true;

if (!isArticle(source, project, manuscriptConfig) && isQmdFile(source)) {
format.render[kIpynbProduceSourceNotebook] = true;
}

if (userEcho === true) {
clearVal.push("code");
} else {
Expand Down

0 comments on commit c8665b7

Please sign in to comment.