From b56c273d8198ae6cee69bbc9fe5a6a61da4074e4 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sat, 6 Jun 2026 12:26:27 -0400 Subject: Code cleanup --- lib/bib-canon.awk | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/bib-canon.awk') diff --git a/lib/bib-canon.awk b/lib/bib-canon.awk index d11e9cb..215e4cc 100644 --- a/lib/bib-canon.awk +++ b/lib/bib-canon.awk @@ -26,3 +26,16 @@ function bib_get(name, j) { return BIB_VAL[j] return "" } + +# render a field value as plain text: strip braces, collapse whitespace +function bib_clean(v) { + gsub(/[{}]/, "", v) + gsub(/[ \t\r\n]+/, " ", v) + return bib_trim(v) +} + +# print a blank line between output records (nothing before the first) +function bib_sep() { + if (BIB_OUT_N++) + print "" +} -- cgit v1.2.3