Skip to main content

Module render

Module render 

Source
Expand description

Turning command results into text or JSON for the terminal.

Functions§

format_json
format_post_submitted_text
format_posts_text
format_time_millis
format_trending_text
render_post_html_to_text
Renders a hashiverse post body (the HTML subset produced by the web client or by convert_text_to_hashiverse_html) as plain text:
sanitize_for_terminal
Makes untrusted text safe to print: control characters other than \n and \t (ESC, CR, BEL, C1 controls, …) are replaced by their visible \u{…} escape, so they cannot drive the terminal (cursor moves, OSC 52 clipboard writes, title changes, overwriting lines).