Skip to content

Commit c25ad4a

Browse files
authored
Merge pull request #8 from koculu/update-docs
update docs.
2 parents e0570ad + 744bdff commit c25ad4a

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

docs-site/src/content/docs/formatting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type ColorOrColorizer = string | Colorizer
2222
2323
### colorizeHTML
2424
25-
Colorize small HTML fragments for terminal display.
25+
Colorize HTML strings.
2626
2727
```ts
2828
import { getLogger } from 'logpot'

packages/printer/src/colorizeHTML.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,15 @@ export interface ColorizeHTMLConfig {
2121
}
2222

2323
/**
24-
* Colorize an HTML snippet for console output.
25-
*
26-
* The function performs a very small amount of parsing using regular
27-
* expressions and wraps different parts of the HTML string with ANSI
28-
* colors. It is not a full HTML parser but works well for debugging
29-
* or visualising small fragments.
24+
* Colorize an HTML string for console output. *
3025
*
3126
* @param html - raw HTML string to colorize.
3227
* @param config - optional {@link ColorizeHTMLConfig} to override defaults.
3328
* @returns the ANSI colored HTML string.
3429
*
3530
* @example
3631
* ```ts
37-
* console.log(colorizeHTML('<div class="greet">Hi</div>'))
32+
* getLogger().debug(colorizeHTML('<div class="greet">Hi</div>'))
3833
* ```
3934
*/
4035
export function colorizeHTML(

0 commit comments

Comments
 (0)