Update editor, workspace, Git services, appearance, and project guides

This commit is contained in:
Knotty Wyvern
2026-10-11 09:41:16 -07:00
parent a8b1defb9d
commit 909894b9c8
153 changed files with 7967 additions and 775 deletions
+5 -1
View File
@@ -2,6 +2,10 @@ export type TableCell = { text: string; from: number; to: number };
export type TableRow = { from: number; to: number; indent: string; cells: TableCell[] };
export type MarkdownTable = { rows: TableRow[]; columns: number; eol: string; end: number };
export function hasTableDelimiter(line: string): boolean {
return /(^|[^\\])(?:\\\\)*\|/.test(line);
}
function row(text: string, from: number): TableRow {
const pipes: number[] = [];
for (let index = 0; index < text.length; index++) {
@@ -30,7 +34,7 @@ export function parseMarkdownTable(source: string): MarkdownTable | null {
let offset = 0;
const eol = source.includes("\r\n") ? "\r\n" : "\n";
for (const line of source.split(eol)) {
if (!line.trim()) break;
if (!line.trim() || (rows.length >= 2 && !hasTableDelimiter(line))) break;
rows.push(row(line, offset));
offset += line.length + eol.length;
}