feat(markdown): support yaml role=tag info string
Accept yaml role=tag alongside legacy yaml/tag so the block body gets yaml syntax highlighting, matching the CLI role= attribute convention. Copy button now emits the role=tag form.
This commit is contained in:
@@ -521,7 +521,7 @@ export function createDeckStore(initialSrc: string = ""): DeckStore {
|
||||
return parts.join("");
|
||||
};
|
||||
|
||||
/** Serialize the deck back to a ```yaml/tag codeblock (round-trips templates). */
|
||||
/** Serialize the deck back to a yaml codeblock (round-trips templates). */
|
||||
const generateYamlCode = () => {
|
||||
const toYamlLayer = (l: LayerConfig) => {
|
||||
const out: Record<string, unknown> = {};
|
||||
@@ -560,8 +560,9 @@ export function createDeckStore(initialSrc: string = ""): DeckStore {
|
||||
lineWidth: -1,
|
||||
noRefs: true,
|
||||
});
|
||||
const fence = "```";
|
||||
return `${fence}yaml/tag\n${yamlStr}${fence}`;
|
||||
const fence = "```yaml role=tag";
|
||||
const backtick = "`";
|
||||
return `${fence}\n${yamlStr}${backtick.repeat(3)}`;
|
||||
};
|
||||
|
||||
const copyCode = async (fallback?: (code: string) => void) => {
|
||||
|
||||
Reference in New Issue
Block a user