You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//at this point we have an tag; is its first child something we want to remain
//unformatted?
var next_tag = this.get_tag(true /* peek. */ );
// test next_tag to see if it is just html tag (no external content)
var tag = (next_tag || "").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);
After debugging it we think it happens when for some reason next_tag returns as a non string.
Here are some example cases that caused exception:
<a class="js-open-move-from-header" href="#">5A - IN-SPRINT TESTING</a>
<a href="http://www.realitica.com/hr/listing/1331556" onclick="reaClickTrack('MwpjYntU2YEro%2F2wGLcTtqdyvNyF%2F%2BGwUZTg5sm6tXoHjcp9c0y2elZUtDvq3QvxCM%2FHrploJR08B2sm5PDAXrofetCjdvdAGLt6DuT56zw%3D');" style="text-decoration: none;color:black;" >Na prodaju LUX trosoban stan 136 m2 u novogradnji,u centru Podgorice.Zgrada je izuzetno kvalitetne gradnje,završena je 2015. godine,a nalazi se ispod Gorice - tik uz buduću Njemačk...</a>
<a" >9</a">
<a href="javascript:;" id="_h_url_paid_pro3" onmousedown="_h_url_click_paid_pro(this);" rel="nofollow" class="pro-title" itemprop="name">WA GlassKote</a>
<a href="/b/yergey-brewing-a-beer-has-no-name/1745600" >"A Beer Has No Name"</a>
<a class="wine-suggest-link" href="https://www.wine-searcher.com/find/la+vina+ardanza+rsrv+doca+rioja+alta+spain">La Rioja Alta Vina Ardanza Reserva, Rioja DOCa, Spain</a>
All the exceptions we are getting are form a single A tag.
The text was updated successfully, but these errors were encountered:
We are getting an exception in our production code on this like of code.
TypeError : (n || "").match is not a function
https://github.com/beautify-web/js-beautify/blob/56fac25c86e352d67e6250966695e617d58e92d8/js/lib/beautify-html.js
After debugging it we think it happens when for some reason next_tag returns as a non string.
Our code:
Here are some example cases that caused exception:
All the exceptions we are getting are form a single A tag.
The text was updated successfully, but these errors were encountered: