hgweb: fix regexp for other styles like monoblue
authorTakumi IINO <trot.thunder@gmail.com>
Wed, 08 Jan 2014 00:26:55 +0900
changeset 20252 1bcf669084bb
parent 20251 7876013de139
child 20253 43cfad930d38
hgweb: fix regexp for other styles like monoblue Some styles have indentation.
mercurial/templates/static/mercurial.js
--- 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;