🐛 Fix: Resolve Markdown list display issues on Windows (#693)

This commit is contained in:
tanzhenxin
2025-09-24 11:00:47 +08:00
committed by GitHub
parent 48d8587bf9
commit e148e4be28
3 changed files with 38 additions and 20 deletions

View File

@@ -6,7 +6,6 @@
import React from 'react';
import { Text, Box } from 'ink';
import { EOL } from 'node:os';
import { Colors } from '../colors.js';
import { colorizeCode } from './CodeColorizer.js';
import { TableRenderer } from './TableRenderer.js';
@@ -35,7 +34,7 @@ const MarkdownDisplayInternal: React.FC<MarkdownDisplayProps> = ({
}) => {
if (!text) return <></>;
const lines = text.split(EOL);
const lines = text.split(`\n`);
const headerRegex = /^ *(#{1,4}) +(.*)/;
const codeFenceRegex = /^ *(`{3,}|~{3,}) *(\w*?) *$/;
const ulItemRegex = /^([ \t]*)([-*+]) +(.*)/;