mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-11 01:30:29 +03:00
Document functions
This commit is contained in:
parent
c32dc33df9
commit
e580982d1f
1 changed files with 6 additions and 0 deletions
|
|
@ -252,6 +252,12 @@ function CodeBlockControls({
|
|||
export function CodeBlock(children: ChildNode[], opts: HTMLReactParserOptions) {
|
||||
const LINE_LIMIT = 14;
|
||||
|
||||
/**
|
||||
* Recursively extracts and concatenates all text content from an array of ChildNode objects.
|
||||
*
|
||||
* @param {ChildNode[]} nodes - An array of ChildNode objects to extract text from.
|
||||
* @returns {string} The concatenated plain text content of all descendant text nodes.
|
||||
*/
|
||||
const extractTextFromChildren = useCallback((nodes: ChildNode[]): string => {
|
||||
let text = '';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue