I'm trying to remove redundant dashed lines from a client's blog site because its erratic lengths are butting heads with the responsive design. Example: ---------------------------------
I created a jquery plug-in to remove individual lines from one post:
$('p:contains(——————————————————————————————-),
p:contains(———————————————————————–),
p:contains(————————————————————————————-),
p:contains(———————————————————————————),
p:contains(——————————————————————–),
p:contains(————————————————————-),
p:contains(————————————————————————————————),
p:contains(—————————————————————————),
p:contains(————————————————————),
p:contains(———————————————————————————–),
p:contains(——————————————————————————-)').each(function() {
$(this).remove();
});
But even this method is redundant lol. I tried rewriting like so using regex:
$('p:contains(----)').each(function(text) {
var hyphen = text.replace(/\u00AD/g,'');
return hyphen;
});
It didn't work and I've since been stuck on it for an hour. If anyone could give me a push in the right direction I would greatly appreciate it. Thanks!