Skip to content

Commit

Permalink
add link to readable source
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Pilgrim committed Sep 27, 2009
1 parent d06da80 commit 3e0cb2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ syntax: glob
build
grid28.gif
copyedit

proofs
6 changes: 5 additions & 1 deletion util/htmlminimizer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/python3
"""Quick-and-dirty HTML minimizer"""

import sys
import re
import html.entities
import itertools
import os.path

_SERVERS = ['a.wearehugh.com',
'b.wearehugh.com',
Expand Down Expand Up @@ -52,4 +54,6 @@
_out.write(line)
else:
_out.write(g)

if g.lower() == '<!doctype html>':
_out.write('\n<!-- readable source @ http://hg.diveintopython3.org/hgweb.cgi/file/tip/{0} -->\n'.format(os.path.basename(input_file)))

0 comments on commit 3e0cb2a

Please sign in to comment.