diff mercurial/templates/static/mercurial.js @ 20252:1bcf669084bb

hgweb: fix regexp for other styles like monoblue Some styles have indentation.
author Takumi IINO <trot.thunder@gmail.com>
date Wed, 08 Jan 2014 00:26:55 +0900
parents 80aa912dcb2d
children 55543ee545ab
line wrap: on
line diff
--- a/mercurial/templates/static/mercurial.js	Sat Nov 16 15:46:29 2013 -0500
+++ b/mercurial/templates/static/mercurial.js	Wed Jan 08 00:26:55 2014 +0900
@@ -394,7 +394,7 @@
                 },
                 function onsuccess(htmlText) {
                     if (mode == 'graph') {
-                        var addHeight = htmlText.match(/^<canvas id="graph".*height="(\d+)"><\/canvas>$/m)[1];
+                        var addHeight = htmlText.match(/^\s*<canvas id="graph".*height="(\d+)"><\/canvas>$/m)[1];
                         addHeight = parseInt(addHeight);
                         graph.canvas.height = addHeight;