+ {codeBlockLines.join('\n')}
+
+ );
+ codeBlockLines = [];
+ inCodeBlock = false;
+ } else {
+ inCodeBlock = true;
+ codeBlockLang = line.trim().slice(3);
+ }
+ return;
+ }
+
+ if (inCodeBlock) {
+ codeBlockLines.push(line);
+ return;
+ }
+
+ // Headings
+ if (line.startsWith('# ')) {
+ elements.push({line.slice(2)}); + } else if (line.trim().startsWith('- ') || line.trim().startsWith('* ')) { + elements.push( +
{formatInline(line)}
); + } + }); + + if (inCodeBlock && codeBlockLines.length > 0) { + elements.push( +
+ {codeBlockLines.join('\n')}
+
+ );
+ }
+
+ return elements;
+ };
+
+ // Helper for inline bold, inline code, links
+ const formatInline = (text: string): React.ReactNode => {
+ // Process inline code `foo`
+ const parts = text.split(/(`[^`]+`)/);
+ return parts.map((part, i) => {
+ if (part.startsWith('`') && part.endsWith('`') && part.length >= 2) {
+ return {part.slice(1, -1)};
+ }
+ // Process bold **text**
+ const boldParts = part.split(/(\*\*[^*]+\*\*)/);
+ return boldParts.map((bPart, j) => {
+ if (bPart.startsWith('**') && bPart.endsWith('**') && bPart.length >= 4) {
+ return {bPart.slice(2, -2)};
+ }
+ return bPart;
+ });
+ });
+ };
+
+ return (
+ Failed to load file content: {error}
+ {onRefresh && ( + + )} ++
| {idx + 1} | +{line || ' '} |
+
Select a symbol from the outline to inspect its callers, dependencies, and impact.
+Select a file from the tree to read its documentation or select a symbol to inspect callers and dependencies.
Select a file from the tree to inspect its symbols and routes.
No symbols found in this file.
++ This file contains documentation or text content with no code AST symbols. +
+ {onReadDoc && ( + + )}