]> git.neil.brown.name Git - edlib.git/commit
lib-renderline: expect control chars instead of <> for attributes.
authorNeilBrown <neil@brown.name>
Wed, 21 Jun 2023 07:48:57 +0000 (17:48 +1000)
committerNeilBrown <neil@brown.name>
Wed, 28 Jun 2023 07:51:41 +0000 (17:51 +1000)
commit2470bb9a2e7d87509afadb876cdacb2bd31b78e4
tree6a9a3755f58de3c313c552650eca69c55ac63c43
parentbd4153a0929188ed786c8b40b3814c32d7b43109
lib-renderline: expect control chars instead of <> for attributes.

Using <> to distinguish attributes is clumsy as it requires that '<' be
quoted.

We already quote control characters, making them <red>^X</red> so use
control characters for distinguishing attributes.
SOH (\1) marks start of attrs
STX (\2) marks end of attrs, start of text
ETX (\3) marks end of the text for those attrs.
ACK (\6) is used as a filler when needed.

A string that start \6 or \1 is assumed not to contain meaningful <>
Otherwise we translate to remain compatible with old code.

Signed-off-by: NeilBrown <neil@brown.name>
DOC/TODO.md
lib-renderline.c
misc.h
tests.d/02-grep