refactor: remove implicit content sniffing and table conversion
- Split loadCSV into parseCSVString (content) and loadCSVFromPath (path); drop isCSV/looksLikeCsv heuristics - Delete coerceSparkTables and markedTable label-header magic; plain markdown tables now render as plain tables - Add explicit markdown role=spark-table fence syntax that converts pipe tables to CSV at scan time, with dice-header validation - Map ESM-only github-slugger and csv-parse browser build to CJS in jest config; add content-registry tests
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
createResource,
|
||||
} from "solid-js";
|
||||
import { parseMarkdown } from "../markdown";
|
||||
import { loadCSV, CSV, processVariables } from "./utils/csv-loader";
|
||||
import { parseCSVString, CSV, processVariables } from "./utils/csv-loader";
|
||||
import { resolveContentRef } from "./utils/resolve-content";
|
||||
import {
|
||||
areAllLabelsNumeric,
|
||||
@@ -59,7 +59,7 @@ customElement(
|
||||
if (content === null) {
|
||||
throw new Error(`Failed to resolve table content: "${ref}"`);
|
||||
}
|
||||
return loadCSV(content);
|
||||
return parseCSVString(content);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user