www-commits
[Top][All Lists]
Advanced

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

www/proprietary/workshop item-create


From: Therese Godefroy
Subject: www/proprietary/workshop item-create
Date: Mon, 28 Jan 2019 05:53:44 -0500 (EST)

CVSROOT:        /webcvs/www
Module name:    www
Changes by:     Therese Godefroy <th_g> 19/01/28 05:53:44

Modified files:
        proprietary/workshop: item-create 

Log message:
        Remove trailing spaces (not allowed in Target field).

CVSWeb URLs:
http://web.cvs.savannah.gnu.org/viewcvs/www/proprietary/workshop/item-create?cvsroot=www&r1=1.6&r2=1.7

Patches:
Index: item-create
===================================================================
RCS file: /webcvs/www/www/proprietary/workshop/item-create,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- item-create 30 Nov 2018 09:18:10 -0000      1.6
+++ item-create 28 Jan 2019 10:53:43 -0000      1.7
@@ -96,10 +96,11 @@
 
 ## Standardize the format.
 
-# Remove comments, blank lines, linefeeds & leading spaces; unwrap.
-sed '/^$/d; /^#/d' item |
+# Remove comments, blank lines, linefeeds, leading & trailing spaces; unwrap.
+sed -e 's,[ \t]*$,,' \
+    -e '/^$/d; /^#/d' item |
 sed ':a /Blurb:.*$/ { N; s,\(.\+\)\n\(.\+\)$,\1 \2,; ba }' |
-sed 's,Blurb: *,Blurb:\n,' > $temp1
+sed 's,Blurb:[ \t]*,Blurb:\n,' > $temp1
 
 # Reformat.
 for tag in p dl dt dd ul li blockquote; do
@@ -147,7 +148,7 @@
     echo "$it is already in $f."
   else
     # Check the target.
-    target=$(sed "/^Target: ${f//./[.]} /{s/.* //;q};d" item)
+    target=$(sed "/^Target: ${f//./[.]} /{s/.* //;q};d" item.rec)
     # If no target id is specified, make sure the page only has one list.
     # Get the id for the second list.
     t2=$(awk 'BEGIN { RS = "" }'"/^Page: ${f//./[.]}\n/"'{ print $5 }' \



reply via email to

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