feat(flowchart): mermaid translator (flowchart TD, all 5 shapes, 3 edge kinds)

Pure Mermaid translator: graph (nodes + edges) -> flowchart TD source.
5 node kinds (process/decision/terminator/subroutine/document) ->
Mermaid syntax ([..], {..}, ([..]), [[..]], [/../]).
3 edge kinds (solid/dotted/thick) -> Mermaid arrows (-->, -.->, ==>).
Label escaping: double quotes become #quot;, newlines become literal \n.

Also moves tests/fixtures per-test dirs to fixtures-epub / fixtures-css
so the shared tests/fixtures/ stays available for snapshot fixtures.

Amit Haridas
This commit is contained in:
2026-09-14 21:36:02 +05:30
parent 4a36b7db76
commit 216e0ecf51
5 changed files with 349 additions and 2 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ const path = require('path');
const ExportCss = require('../src/main/ExportCss');
describe('ExportCss.build', () => {
const fakeFontPath = path.join(__dirname, 'fixtures', 'fake.woff2');
// Per-test fixture dir (not the shared tests/fixtures/ used by snapshot fixtures).
const fakeFontPath = path.join(__dirname, 'fixtures-css', 'fake.woff2');
const fixture = Buffer.from('woff2-binary-fake-data');
beforeAll(() => {