@pep/term-deck 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/term-deck.js +22 -11
- package/dist/bin/term-deck.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/term-deck.js
CHANGED
|
@@ -709,9 +709,24 @@ function processCodeBlocks(content) {
|
|
|
709
709
|
return [top, ...boxedLines, bottom].join("\n");
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
+
function processMarkdownInline(content) {
|
|
713
|
+
let result = content;
|
|
714
|
+
result = result.replace(/\*\*([^*]+)\*\*/g, "{bold}$1{/bold}");
|
|
715
|
+
result = result.replace(/__([^_]+)__/g, "{bold}$1{/bold}");
|
|
716
|
+
result = result.replace(/(?<![*\w])\*([^*]+)\*(?![*\w])/g, "{light-black-fg}$1{/light-black-fg}");
|
|
717
|
+
result = result.replace(/(?<![_\w])_([^_]+)_(?![_\w])/g, "{light-black-fg}$1{/light-black-fg}");
|
|
718
|
+
result = result.replace(/`([^`]+)`/g, "{inverse} $1 {/inverse}");
|
|
719
|
+
result = result.replace(/~~([^~]+)~~/g, "{strikethrough}$1{/strikethrough}");
|
|
720
|
+
result = result.replace(/^(#{1,6})\s+(.+)$/gm, "{bold}$2{/bold}");
|
|
721
|
+
result = result.replace(/^[-*_]{3,}$/gm, "\u2500".repeat(40));
|
|
722
|
+
result = result.replace(/^[\s]*[-*+]\s+/gm, " \u2022 ");
|
|
723
|
+
result = result.replace(/^[\s]*(\d+)\.\s+/gm, " $1. ");
|
|
724
|
+
return result;
|
|
725
|
+
}
|
|
712
726
|
async function processSlideContent(body, theme) {
|
|
713
727
|
let processed = processMermaidDiagrams(body);
|
|
714
728
|
processed = processCodeBlocks(processed);
|
|
729
|
+
processed = processMarkdownInline(processed);
|
|
715
730
|
processed = colorTokensToBlessedTags(processed, theme);
|
|
716
731
|
return processed;
|
|
717
732
|
}
|
|
@@ -3224,16 +3239,12 @@ function ensureFontInitialized() {
|
|
|
3224
3239
|
}
|
|
3225
3240
|
async function generateBigText(text, gradientColors, font = "Standard") {
|
|
3226
3241
|
ensureFontInitialized();
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
const gradientFn = gradient2(gradientColors);
|
|
3234
|
-
resolve(gradientFn(result));
|
|
3235
|
-
});
|
|
3236
|
-
});
|
|
3242
|
+
const result = figlet.textSync(text, { font });
|
|
3243
|
+
if (!result) {
|
|
3244
|
+
throw new Error("Failed to generate figlet text");
|
|
3245
|
+
}
|
|
3246
|
+
const gradientFn = gradient2(gradientColors);
|
|
3247
|
+
return gradientFn(result);
|
|
3237
3248
|
}
|
|
3238
3249
|
async function generateMultiLineBigText(lines, gradientColors, font = "Standard") {
|
|
3239
3250
|
const results = await Promise.all(
|
|
@@ -3684,7 +3695,7 @@ var init_main = __esm({
|
|
|
3684
3695
|
init_esm_shims();
|
|
3685
3696
|
|
|
3686
3697
|
// package.json
|
|
3687
|
-
var version = "1.2.
|
|
3698
|
+
var version = "1.2.3";
|
|
3688
3699
|
|
|
3689
3700
|
// src/cli/commands/present.ts
|
|
3690
3701
|
init_esm_shims();
|