trans-coord-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trans-coord/gnun/server/gnun ChangeLog GNUmakef...


From: Pavel Kharitonov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakef...
Date: Fri, 14 Jun 2013 11:54:11 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Pavel Kharitonov <ineiev>       13/06/14 11:54:11

Modified files:
        gnun/server/gnun: ChangeLog GNUmakefile NEWS 

Log message:
        (extract-title): Ignore HTML tags in comments.
        (skip-comments): New function.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.373&r2=1.374
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.160&r2=1.161
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.88&r2=1.89

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.373
retrieving revision 1.374
diff -u -b -r1.373 -r1.374
--- ChangeLog   21 May 2013 10:18:34 -0000      1.373
+++ ChangeLog   14 Jun 2013 11:54:09 -0000      1.374
@@ -1,3 +1,9 @@
+2013-06-14  Pavel Kharitonov  <address@hidden>
+
+       * GNUmakefile (extract-title): Ignore HTML tags in comments.
+        (skip-comments): New function.
+       * NEWS: Update.
+
 2013-05-21  Pavel Kharitonov  <address@hidden>
 
        * gnun-validate-html.in: New option, `--apache-vars'.

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -b -r1.160 -r1.161
--- GNUmakefile 25 Apr 2013 05:52:52 -0000      1.160
+++ GNUmakefile 14 Jun 2013 11:54:09 -0000      1.161
@@ -714,6 +714,11 @@
 exit 1
 endef
 
+# The command to filter out HTML comments
+define skip-comments
+ $(SED) \
+  ':b;/<!--/{:l;/<!--.*-->/!{N;bl};:n;s/<!---->//;tb;s/<!---\?[^-]*/<!--/;bn}'
+endef
 # The command to extract a meaningful human-readable title from a
 # .LANG.html.  Some HTML entities that are sometimes used in titles
 # are transformed, to avoid annoying stuff in email subjects.  When
@@ -726,8 +731,9 @@
 # ANNOUNCE=yes.
 define extract-title
 title_tag='h2'; \
-if ! $(GREP) -q "<$$$$title_tag" $$@; then title_tag='title'; fi; \
-echo -n \`$(GREP) --max-count=1 "<$$$$title_tag" address@hidden \
+if ! $(skip-comments) $$@ | $(GREP) -q "<$$$$title_tag"; \
+then title_tag='title'; fi; \
+echo -n \`$(skip-comments) $$@ | $(GREP) --max-count=1 "<$$$$title_tag"\` \
   | $(SED) '/<\/'$$$$title_tag'>/!s/$$$$/.../;\
             s/.*<'$$$$title_tag'[^>]*>//;s/<\/'$$$$title_tag'>.*//' \
   | $(SED) 's/\&[mn]dash;/--/g; s/\&nbsp;/ /g' \

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- NEWS        21 May 2013 10:18:34 -0000      1.88
+++ NEWS        14 Jun 2013 11:54:10 -0000      1.89
@@ -34,6 +34,9 @@
 *** The difference detection for PO files was improved
     in GNUmakefile.team.
 
+*** HTML tags in comments were able to confuse GNUN when it
+    was extracting titles of the articles.
+
 * Changes in GNUnited Nations 0.7 (2012-12-27)
 
 ** GNUmakefile.team enhancements:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]