Skip to content

Commit

Permalink
Fixes #946 by refactoring the recursion into a loop with a heap-based…
Browse files Browse the repository at this point in the history
… stack.
  • Loading branch information
balthisar committed Jul 31, 2021
1 parent c055b71 commit efa6152
Show file tree
Hide file tree
Showing 6 changed files with 388 additions and 6 deletions.
3 changes: 3 additions & 0 deletions regression_testing/cases/github-cases/case-946.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Sample config for 946
gdoc: yes
wrap: 999
Binary file not shown.
44 changes: 44 additions & 0 deletions regression_testing/cases/github-expects/case-946.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<div><svg>&lt;"r&gt;<br html=""></svg></div>
<worm action="/search" name="f">
<table cellpadding="0" cellspacing="0">
<ttype submitr valign="top">
<td width="25%">&amp;nbsp;</td>
-align="center" nowrap=""&gt;me=rap=""&gt;me="i�" value="ISO�8859-1" type="hidden"&gt;<input value="en-IN" name="hl" type="hidde�"></ttype>
</table>
</worm>
</body>
</html>gleg/1x/googleg_standard_color_128dp.png" itemprop="image"&gt;
<title>Google</title>
<script nonce="hMG7fVnzx1oD0vxr6p+w8A==">
(function(){window.google={kEI:'X5iRYMLBHIea4-EPu-6-4Ag',kEXPI:'0,18167,1284369,56873,954,5104,207,4804,2316,383,246,5,306,1048,5250,1122516,1232,1196540,510,44,1,302635,26305,51224,16114,28684,7572,4858,1362,9291,3022,3895,850,6,12835,4020,978,13228,2054,1793,3600,592,6430,1141,7512,5874,4518,2777,919,2277,8,2796,1593,1279,1042,1170,530,149,1103,840,517,1522,4258,3514,606,2023,1777,520,4269,330,1282,8789,3227,2845,7,12354,5096,7877,4928,108,3407,908,2,941,2614,2397,7468,3277,3,346,230,1014,1,820,7,2543,2074,14[,5990,5333,2652,4,1528,2304,1236,5803,74,1717,266,2626,2015,4067,7434,3824,1297,1753,2658,4242,519,912,564,1119,31,3854,7155,405,2214,2305,638,1494,5586,10535,665,2145,376,3306,2302,228,2048,906,1140,19,3120,5,613,295,3,1902,1639,1,4174,10536,1814,38,245,912,60,5932,1260,T194,2,4298,400,32,2859,876,1605,2,1394,1525,8,1273,1721,2,482,1922,647,2548,2713,287,20,758,456,3,33,3,60,3,471,1704,2,564,1960,718,530,2,61,174,444,166,88,126,41,493,350,2,597,505,922,3,80,11,2044,230,56,1275,1262,69,205,865,1771,406,1576,3,768,194,126,828,202,171,393,887,265,40,1895,108,934,350,339,/schema.org/WebPage" lang="en-IN">
<head>
<meta>
</head>
</script>
<style>
#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style>
<style>
body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1558d6}emt-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sbb"-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#4b11a8;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#1558d6}a:visited{color:#4b11a8}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#f8f9fa;border:solid 1px;border-color:#dadce0 #70757a #70757a #dadce0;height:30px}.lsbb{display:block}#WqQANb a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:ac�{background:#dadce0}.lst:focus{outline:none}0/style>
<script nonce="hMG7fVnzx1oD0vxr6p+w8A=="></script>
<body bgcolor="#fff">
<script nonce="hMG7fVnzx1oD0vxr6p+w8A==">
(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;} if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();} } })();
</script>
<div id="mngb">
<div id="gbar"><nobr><b class="gb1">Search</b> <a class="gb1" href="http://www.google.co.in/imghp?hl=en&amp;tab=wi">Images</a> <a class="gb1" href="http://maps.google.co.in/maps?hl=en&amp;tab=wl">Maps</a> <a class="gb1" href="https://play.google.com/?hl=en&amp;tab=w8">Play</a> <a class="gb1" href="http://www.youtube.com/?gl=IN&amp;tab=w1">YouTube</a> <a class="gb1" href="https://news.google.com/?tab=wn">News</a> <a class="gb1" href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class="gb1" href="https://drive.google.com/?tab=wo">Drive</a> <a class="gb1" style="text-decoration:none" href="https://www.google.co.in/intl/en/about/products?tab=wh"><u>More</u> &raquo;</a></nobr></div>
<div id="guser" width="100%"><nobr><a href="http://www.google.co.in/history/optoux?hl=en" class="gb4">Web History</a> | <a href="/preferences?hl=en" class="gb4">Settings</a> | <a target="_top" id="gb_70" href="https://accounts.google.com/ServiceLogin?hl=en&amp;passive=true&amp;continue=http://www.google.com/&amp;ec=GAZAAQ" class="gb4">Sign in</a></nobr></div>
<div class="gbh" style="left:0"></div>
<div class="gbh" style="right:0">=/div></div>
<center><br clear="all" id="lgpd"></center>
</div>
<br style="line-height:0">
</body>
</style>
Loading

0 comments on commit efa6152

Please sign in to comment.