Follow

Is there a word (or short phrase) for "text formated to display in a terminal via ANSI escape codes"?

Put differently, how do I fill in the blank below:

If I want `*text*` to render as bold text in a web browser, I convert markdown to HTLM. If I want it to render as bold text in a terminal, I convert it to __________.

@codesections SGR (Se(lec)t¹ Graphic Rendition) Text perhaps?

¹: according to en.wikipedia.org/wiki/ANSI_esc ECMA-48 calls it Select, while Linux man pages call it Set.

@codesections (also, in case you copy/pasted it from your actual target document, you typo'ed HTML :))

@codesections That's quite tricky; especially since the original way of doing bold was backspace overtype!

@codesections I was wondering the same thing (I needed to name the counterpart of `render_to_html()` in LibMarkdown), and ended up naming it simply `render_for_terminal()`, with an appropriate comment about it emitting escape codes/sequences.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.