Aggiunti colori commentosi.
Leonardo [2010-05-24 16:28]
Aggiunti colori commentosi.
diff --git a/pywhois.py b/pywhois.py
index 053f57e..9e046c0 100644
--- a/pywhois.py
+++ b/pywhois.py
@@ -287,6 +287,10 @@ class WhoisHTTPRequestHandler(BaseHTTPRequestHandler):
margin: auto;
margin-left: 50px;
}
+
+ .comment {
+ color: #993333;
+ }
</style>
"""
@@ -311,6 +315,8 @@ class WhoisHTTPRequestHandler(BaseHTTPRequestHandler):
"""
# Sostituiamo le cose con i tag relativi
+ for match in re.findall(r"(::.*)\n", string):
+ string = string.replace(match, "<span class=\"comment\">%s</span>" % match)
string = re.sub(r"\n", "<br />\n", string)
# Creiamo effettivamente la pagina