blog: add SVG diagrams to pi-flow-native-brain (gate pipeline + deletion bar), real table; build.js raw-HTML passthrough
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,7 @@ function md(src) {
|
||||
let inCode = false;
|
||||
let codeLang = "";
|
||||
let codeLines = [];
|
||||
let inRaw = false;
|
||||
|
||||
function closeUl() {
|
||||
if (inUl) { html += "</ul>\n"; inUl = false; }
|
||||
@@ -59,6 +60,13 @@ function md(src) {
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
|
||||
// Raw HTML passthrough — everything between <!--raw--> and <!--/raw-->
|
||||
// is emitted verbatim (no escaping, no <p> wrap). For inline SVG diagrams,
|
||||
// tables, or any hand-authored markup the minimal converter can't express.
|
||||
if (line.trim() === "<!--raw-->") { closeUl(); inRaw = true; continue; }
|
||||
if (line.trim() === "<!--/raw-->") { inRaw = false; continue; }
|
||||
if (inRaw) { html += line + "\n"; continue; }
|
||||
|
||||
// Fenced code blocks
|
||||
if (line.startsWith("```")) {
|
||||
if (!inCode) {
|
||||
|
||||
Reference in New Issue
Block a user