From c936c09db93df97412a24e550a2cecdc1aad0f3b Mon Sep 17 00:00:00 2001 From: Sanders Kleinfeld Date: Tue, 26 Aug 2014 09:47:15 -0400 Subject: [PATCH] More robust trim-url function that strips initial "www." (without preceding "http://") and trailing forward slashes. --- htmlbook-xsl/xrefgen.xsl | 43 ++++++++--- htmlbook-xsl/xspec/xrefgen.xspec | 127 ++++++++++++++++++++++++++++++- 2 files changed, 156 insertions(+), 14 deletions(-) diff --git a/htmlbook-xsl/xrefgen.xsl b/htmlbook-xsl/xrefgen.xsl index f0d2b9b6..ffb72779 100755 --- a/htmlbook-xsl/xrefgen.xsl +++ b/htmlbook-xsl/xrefgen.xsl @@ -619,17 +619,38 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/htmlbook-xsl/xspec/xrefgen.xspec b/htmlbook-xsl/xspec/xrefgen.xspec index 698b1619..944523a7 100755 --- a/htmlbook-xsl/xspec/xrefgen.xspec +++ b/htmlbook-xsl/xspec/xrefgen.xspec @@ -708,6 +708,11 @@

http://oreilly.com

oreilly.com

oreilly.com

+

www.oreilly.com

+

http://oreilly.com

+

oreilly.com

+

oreilly.com

+

www.oreilly.com

some awesome location in the text

XREF masquerading as an external hyperlink (no proper data-type)

tools@oreilly.com

@@ -745,6 +750,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -801,6 +846,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1033,18 +1118,54 @@ sidebar oreilly.com + + + + www.oreilly.com + + oreilly.com + - + http://www.oreilly.com - oreilly.com + oreilly.com + + + + + oreilly.com/ + + oreilly.com + + + + + http://oreilly.com/ + + oreilly.com + + + + + www.oreilly.com/ + + oreilly.com - + + + http://www.oreilly.com/ + + oreilly.com + + + oreilly.com oreilly.com +