changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: Ignore leading spaces/tabs when extracting a title from HTML files.

changeset 654: e7610acba076
parent 653: e1cb72de8a51
child 655: d825e5ea9195
author: Uriel <u@berlinblue.org>
date: Thu, 30 Jun 2011 22:58:17 +0000
files: bin/werclib.rc
description: Ignore leading spaces/tabs when extracting a title from HTML files.
     1.1--- a/bin/werclib.rc	Tue Jun 28 22:12:53 2011 +0000
     1.2+++ b/bin/werclib.rc	Thu Jun 30 22:58:17 2011 +0000
     1.3@@ -102,7 +102,7 @@
     1.4 
     1.5     # As a backup we might want to pick the first 'non-tag' text in the file with:
     1.6     if(~ $"t '')
     1.7-        t=`{sed -n -e 's/^(<[^>]+>)*([^<]+).*/\2/p; 32q' < $1 | sed 1q}
     1.8+        t=`{sed -n -e 's/^[ 	]*(<[^>]+>)*([^<]+).*/\2/p; 32q' < $1 | sed 1q}
     1.9 
    1.10     echo $t
    1.11 }