sapling/hgext
Anton Shestakov 403857c028 highlight: produce correct markup when there's a blank line just before EOF
Due to how the colorized output from pygments was stripped of <pre> elements,
when there was an empty line at the end of a file, highlight extension produced
an incorrect markup (no closing tags from the fileline/annotateline template).
It wasn't usually noticeable, because browsers were smart enough to see where
the missing tags should've been, but in monoblue style it resulted in the last
line having twice the normal height.

Instead of awkwardly trying to strip outer <pre></pre> tags, let's make the
formatter with nowrap=True, which should do what we need in pygments since at
least 0.5 (2006-10-30).

Example from monoblue style:

Before:

    <div class="source">

<div style="font-family:monospace" class="parity0">
<pre><a class="linenr" href="#l1" id="l1">     1</a> </pre>
</div>
<div style="font-family:monospace" class="parity1">
<pre><a class="linenr" href="#l2" id="l2">     2</a>
    </div>

Now:

    <div class="source">

<div style="font-family:monospace" class="parity0">
<pre><a class="linenr" href="#l1" id="l1">     1</a> </pre>
</div>
<div style="font-family:monospace" class="parity1">
<pre><a class="linenr" href="#l2" id="l2">     2</a> </pre>
</div>
    </div>

(Notice the missing </pre></div> now in place)
2015-07-22 10:19:17 +08:00
..
convert convert: use 'default' for specifying branch name in branchmap (issue4753) 2015-07-14 14:40:56 +01:00
highlight highlight: produce correct markup when there's a blank line just before EOF 2015-07-22 10:19:17 +08:00
largefiles largefiles: allow the archiving of largefiles to be disabled 2015-07-11 23:26:33 -04:00
zeroconf extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
__init__.py Re-add hgext/__init__.py 2005-09-29 12:49:01 -07:00
acl.py acl: mark deprecated config option 2015-06-25 17:36:46 -05:00
blackbox.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
bugzilla.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
censor.py censor: make various path forms available like other Mercurial commands 2015-07-17 00:22:16 +09:00
children.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
churn.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
color.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
eol.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
extdiff.py extdiff: add support for subrepos 2012-07-15 12:43:10 -04:00
factotum.py factotum: use try/except/finally 2015-05-15 09:54:56 -05:00
fetch.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
gpg.py gpg: mention undocumented options 2015-06-25 17:35:57 -05:00
graphlog.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
hgcia.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
hgk.py hgk: tweak doc format for path option 2015-06-25 17:37:14 -05:00
histedit.py histedit: mark defaultrev option experimental 2015-06-25 17:37:35 -05:00
keyword.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
mq.py mq: tweak config reading to make check-config happy 2015-06-25 17:41:40 -05:00
notify.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
pager.py pager: drop python 2.4 hack around subprocess 2015-05-18 16:20:12 -05:00
patchbomb.py patchbomb: make sure all users of smtp.verifycert agree on the default 2015-07-17 13:41:07 -05:00
progress.py progress: deprecate the progress extension 2015-06-08 01:01:21 -07:00
purge.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
rebase.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
record.py record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i' 2015-07-15 04:45:58 +09:00
relink.py global: mass rewrite to use modern exception syntax 2015-06-23 22:20:08 -07:00
schemes.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
share.py share: make option docs more check-config friendly 2015-07-18 14:17:17 -05:00
shelve.py shelve: make maxbackup doc check-config friendly 2015-07-18 14:17:46 -05:00
strip.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
transplant.py transplant: mark some undocumented options deprecated 2015-06-25 17:42:09 -05:00
win32mbcs.py extensions: document that testedwith = 'internal' is special 2015-04-28 16:44:37 -04:00
win32text.py win32text: mark deprecated extension option deprecated 2015-06-25 17:42:45 -05:00