From c7ea69c641705f93aad1f35f14cc0425691aa0a5 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 27 Apr 2017 02:38:40 +0200 Subject: [PATCH] browser: strip link urls from cell titles --- browser.plp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/browser.plp b/browser.plp index 85ed156..de245b8 100644 --- a/browser.plp +++ b/browser.plp @@ -311,6 +311,15 @@ sub formatnotes { return @html; } +sub notestotitle { + my @notes = @_; + for (@notes) { + EscapeHTML($_); + s{ \[ ([^]]*) \] \( [^)]* \) }{$1}gx; # strip link urls + } + return @notes; +} + sub saytitlecol { my ($id) = @_; my $row = $caniuse->{data}->{$id}; @@ -396,7 +405,7 @@ sub saybrowsercols { map { split / /, $_ } $prev )); - $title .= "\n".EscapeHTML($_) for @notes; + $title .= "\n$_" for notestotitle(@notes); printf('%s', join(' ', -- 2.30.0