Ignore possible leading/trailing annoying HTML in the actual content - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset 53e823eeeb47d72dd8af481c5ff4d78046874224
(DIR) parent e973111eae7f9c130e4357dfbbbf252b2789d1d3
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 10 Sep 2018 15:08:03
Ignore possible leading/trailing annoying HTML in the actual content
Diffstat:
rep/article.cgi | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff -r e973111eae7f -r 53e823eeeb47 rep/article.cgi
--- a/rep/article.cgi Mon Sep 10 15:03:17 2018 +0200
+++ b/rep/article.cgi Mon Sep 10 15:08:03 2018 +0200
@@ -33,9 +33,8 @@
}
/<div amp-access="showContent"/,/<div class="detail-tag_container">/ {
- if ($0 ~ /<div class="detail-tag_container">/) {
- next
- }
+ sub(/^.*<div amp-access/, "<div amp-access")
+ sub(/<div class="detail-tag_container">.*/, "")
# Remove images
gsub(/<noscript><img.*<\/noscript>/, "")