mirror of
https://github.com/jimeh/commonflow.org.git
synced 2026-02-19 05:46:40 +00:00
wip: inline diagram SVG
This commit is contained in:
@@ -32,7 +32,6 @@ export interface SpecSection {
|
||||
}
|
||||
|
||||
export interface ParsedSpec {
|
||||
svgPath: string;
|
||||
introduction: string;
|
||||
summary: string;
|
||||
terminology: string;
|
||||
@@ -340,10 +339,7 @@ function buildTocItems(parsed: Partial<ParsedSpec>): TocItem[] {
|
||||
*/
|
||||
export async function parseSpecContent(
|
||||
markdown: string,
|
||||
version: string,
|
||||
): Promise<ParsedSpec> {
|
||||
const svgPath = `/spec/${version}.svg`;
|
||||
|
||||
// Parse markdown to AST
|
||||
const tree = unified().use(remarkParse).parse(markdown) as Root;
|
||||
|
||||
@@ -423,7 +419,6 @@ export async function parseSpecContent(
|
||||
}));
|
||||
|
||||
const parsed: ParsedSpec = {
|
||||
svgPath,
|
||||
introduction,
|
||||
summary,
|
||||
terminology,
|
||||
|
||||
Reference in New Issue
Block a user