]> granicus.if.org Git - graphviz/commitdiff
Replace non-breaking spaces with CSS class
authorMark Hansen <markhansen@google.com>
Thu, 18 Mar 2021 09:44:58 +0000 (20:44 +1100)
committerMark Hansen <markhansen@google.com>
Thu, 18 Mar 2021 09:44:58 +0000 (20:44 +1100)
This is simpler and allows easier control of width styling.

doc/infosrc/mkcolors.awk

index 6b11d7eb3487377a3b370b122e213b4241d3a632..5d13bcc4e3f8fa4867577605d658c40d3412a982 100644 (file)
@@ -6,11 +6,9 @@ function value (r, g, b) {
 }
 function putColor (n, r, g, b, v)
 {
-  if (length(n) > 4) p = "";
-  else p = "&nbsp;&nbsp;&nbsp;";
   printf ("<td bgcolor=\"#%02x%02x%02x\" title=\"#%02x%02x%02x\">",r,g,b,r,g,b); 
-  if (v < 0.51) printf ("<font color=\"white\">%s%s%s</font>", p,n,p);
-  else printf ("%s%s%s", p,n,p);
+  if (v < 0.51) printf ("<font color=\"white\">%s</font>", n);
+  else printf ("%s", n);
   printf ("</td>\n");
 }
 BEGIN {
@@ -28,7 +26,7 @@ BEGIN {
     sub(".*/","",name);
     printf ("%s color scheme<BR>\n", name);
   }
-  printf ("<table border=\"1\" align=\"center\">\n");
+  printf ("<table border=\"1\" align=\"center\" class=\"gv-colors\">\n");
 }
 {
   if (singleRow) idx = NR;