Commits

juster  committed 67f9dcb

Add strict-mode to prettifier.

With strict mode, double-quotes are replaced with dates.
Without strict mode, duplicate dates are replaced with double-quotes.

  • Participants
  • Parent commits 629a93c

Comments (0)

Files changed (1)

-#$1 == entry[NR-1,1] { $1 = "\"" }
+NF < 5 { next }
+
+strict && NR > 1 {
+	if($1 == "\"") $1 = lastd
+	else lastd = $1
+}
+
+!strict && NR > 1 {
+	if($1 == lastd) $1 = "\""
+	else if($1 != "\"") lastd = $1
+}
 
 {
     for (i = 1; i <= 4; i++) {