mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
chore: fix biome issues
This commit is contained in:
@@ -21,7 +21,7 @@ import { GRAPH_FILE } from "../constants.js";
|
||||
*/
|
||||
async function buildGraph() {
|
||||
// Initialize a multi-graph (allows multiple edges between same nodes)
|
||||
// @ts-ignore - graphology constructor type issue
|
||||
// @ts-expect-error - graphology constructor type issue
|
||||
const graph = new Graph({
|
||||
multi: true,
|
||||
type: "directed",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bun
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { CheerioAPI } from "cheerio";
|
||||
import * as cheerio from "cheerio";
|
||||
import { readFileSync, writeFileSync } from "fs";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
// Resolve the path to the HTML file (relative to repo root)
|
||||
const htmlUrl = new URL(
|
||||
|
||||
@@ -266,17 +266,17 @@ export function convertTablesToMarkdown($: cheerio.CheerioAPI): void {
|
||||
// Header row
|
||||
if (rows.length > 0) {
|
||||
const header = rows[0].concat(Array(maxCols - rows[0].length).fill(""));
|
||||
mdLines.push("| " + header.join(" | ") + " |");
|
||||
mdLines.push(`| ${header.join(" | ")} |`);
|
||||
}
|
||||
|
||||
// Separator
|
||||
mdLines.push("|" + Array(maxCols).fill(" --- ").join("|") + "|");
|
||||
mdLines.push(`|${Array(maxCols).fill(" --- ").join("|")}|`);
|
||||
|
||||
// Data rows (skip header if we have more rows)
|
||||
const dataRows = rows.length > 1 ? rows.slice(1) : [];
|
||||
for (const row of dataRows) {
|
||||
const padded = row.concat(Array(maxCols - row.length).fill(""));
|
||||
mdLines.push("| " + padded.join(" | ") + " |");
|
||||
mdLines.push(`| ${padded.join(" | ")} |`);
|
||||
}
|
||||
|
||||
// Replace table with markdown
|
||||
|
||||
Reference in New Issue
Block a user