whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: May not use logo. Text may be split across lines.
Date Thu, 27 Apr 2017 18:41:22 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  3796776   May not use logo. Text may be split across lines.
3796776 is described below

commit 379677622eb433d9b91a54bf8bbc95dd0a1dde72
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Apr 27 19:41:21 2017 +0100

    May not use logo. Text may be split across lines.
---
 tools/site-scan.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index cb63092..5443ad0 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -87,9 +87,10 @@ def parse(site, name)
   doc.traverse do |node|
     next unless node.is_a?(Nokogiri::XML::Text)
     # scrub is needed as some sites have invalid UTF-8 bytes
-    txt = node.text.scrub
+    # gsub needed because we may need to match multiple words
+    txt = node.text.scrub.gsub(/[[:space:]]+/, ' ')
     # trademarks may appear twice. TODO use array?
-    if txt =~ / Apache feather logo\b/ and not data[:trademarks]
+    if txt =~ / Apache feather\b/ and not data[:trademarks]
       t, p = getText(txt, node)
       data[:trademarks] = t
       data[:tradeparent] = p if p

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message