language and tabs:

* Use en as language when language is not declared
  * Use one space instead of one tab
This commit is contained in:
Stefan Ritter 2011-03-22 23:18:16 +01:00
parent bf758a26ac
commit 0f4dabc2dd
1 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,7 @@ no_break = re.compile("^\s*(<ul|</ul>|<li|</li>|<ol|</ol>|<table|</table>|<tr|</
line_start_hyphen = re.compile("^-.*$") line_start_hyphen = re.compile("^-.*$")
line_start_plus = re.compile("^\+.*$") line_start_plus = re.compile("^\+.*$")
tab = "\t" tab = " "
def generate_uuid(string): def generate_uuid(string):
string_md5sum = md5(string).hexdigest() string_md5sum = md5(string).hexdigest()
@ -56,7 +56,10 @@ def document_header(string):
if string == "html": if string == "html":
print "Content-type: text/html\n" print "Content-type: text/html\n"
print "<!DOCTYPE html>" print "<!DOCTYPE html>"
print "<html lang=\"" + language + "\">" try:
print "<html lang=\"" + language + "\">"
except NameError:
print "<html lang=\"en\">"
if string == "atom": if string == "atom":
print "Content-type: application/atom+xml\n" print "Content-type: application/atom+xml\n"
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>" print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"