Give WARNING paragraphs a splash of color I'm not sure if this is necessary. I was playing around and this didn't look terrible. Though it will probably turn x509.h into a sea of yellow when it's ready to be rendered. Change-Id: I34b26aad8a779a3fde761558d15b64c79159892a Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64931 Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/util/doc.css b/util/doc.css index f176f25..05d90be 100644 --- a/util/doc.css +++ b/util/doc.css
@@ -56,6 +56,16 @@ border-radius: 5px; } +p.warning { + background-color: #fef5d3; + padding: 5px; + border-radius: 5px; +} + +p.warning .first-word { + font-weight: bold; +} + .comment pre { margin-left: 2em; }
diff --git a/util/doc.go b/util/doc.go index 21d9dab..1de7064 100644 --- a/util/doc.go +++ b/util/doc.go
@@ -641,7 +641,11 @@ switch block.Type { case CommentParagraph: - b.WriteString("<p>") + if strings.HasPrefix(block.Paragraph, "WARNING:") { + b.WriteString("<p class=\"warning\">") + } else { + b.WriteString("<p>") + } b.WriteString(string(markupParagraph(allDecls, block.Paragraph))) b.WriteString("</p>") case CommentOrderedListItem, CommentBulletListItem: