Various spelling improvements (#3497)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
This commit is contained in:
Josh Soref
2025-07-21 17:54:44 -04:00
committed by GitHub
parent 8be5f8038a
commit dc2ac144b7
48 changed files with 91 additions and 91 deletions

View File

@@ -50,7 +50,7 @@ function renderHastNode(
}
// Determine the color to pass down: Use this element's specific color
// if found, otherwise, continue passing down the already inherited color.
// if found; otherwise, continue passing down the already inherited color.
const colorToPassDown = elementColor || inheritedColor;
// Recursively render children, passing the determined color down
@@ -70,7 +70,7 @@ function renderHastNode(
// Handle Root Node: Start recursion with initially inherited color
if (node.type === 'root') {
// Check if children array is empty - this happens when lowlight can't detect language fallback to plain text
// Check if children array is empty - this happens when lowlight can't detect language fall back to plain text
if (!node.children || node.children.length === 0) {
return null;
}
@@ -161,7 +161,7 @@ export function colorizeCode(
`[colorizeCode] Error highlighting code for language "${language}":`,
error,
);
// Fallback to plain text with default color on error
// Fall back to plain text with default color on error
// Also display line numbers in fallback
const lines = codeToHighlight.split('\n');
const padWidth = String(lines.length).length; // Calculate padding width based on number of lines

View File

@@ -200,7 +200,7 @@ describe('commandUtils', () => {
expect(mockChild.stdin.end).toHaveBeenCalled();
});
it('should fallback to xsel when xclip fails', async () => {
it('should fall back to xsel when xclip fails', async () => {
const testText = 'Hello, world!';
let callCount = 0;

View File

@@ -29,7 +29,7 @@ This function aims to find an *intelligent* or "safe" index within the provided
* **Single Line Breaks:** If no double newline is found in a suitable range, it will look for a single newline (`\n`).
* Any newline chosen as a split point must also not be inside a code block.
4. **Fallback to `idealMaxLength`:**
4. **Fall back to `idealMaxLength`:**
* If no "safer" split point (respecting code blocks or finding suitable newlines) is identified before or at `idealMaxLength`, and `idealMaxLength` itself is not determined to be an unsafe split point (e.g., inside a code block), the function may return a length larger than `idealMaxLength`, again it CANNOT break markdown formatting. This could happen with very long lines of text without Markdown block structures or newlines.
**In essence, `findSafeSplitPoint` tries to be a good Markdown citizen when forced to divide content, preferring structural boundaries over arbitrary character limits, with a strong emphasis on not corrupting code blocks.**