summaryrefslogtreecommitdiff
path: root/tmac
diff options
context:
space:
mode:
authorwl <wl>2005-08-12 08:35:08 +0000
committerwl <wl>2005-08-12 08:35:08 +0000
commit5796bf87fd793bff24f40102324ed983ffa5692f (patch)
tree17f0c630d88b1349ddd1d581300c51a9a9d5a3c1 /tmac
parent77c17a6b381f30ef7f05ca5aff8433299a67fb14 (diff)
downloadgroff-5796bf87fd793bff24f40102324ed983ffa5692f.tar.gz
* tmac/www.tmac (URL, MTO): Handle empty \\$1 better.
Diffstat (limited to 'tmac')
-rw-r--r--tmac/www.tmac66
1 files changed, 48 insertions, 18 deletions
diff --git a/tmac/www.tmac b/tmac/www.tmac
index 4ba75c3c..5dcbd1ee 100644
--- a/tmac/www.tmac
+++ b/tmac/www.tmac
@@ -322,8 +322,10 @@ www functionality. It should work with any macro set.
.\" if description is absent then the url becomes the anchor text
.\"
.de URL
-. ds \\$0:adr \\$1\"
-. www:url_breaks \\$0:adr
+. ie !'\\$1'' \{\
+. ds \\$0:adr \\$1\"
+. www:url_breaks \\$0:adr
+. \}
. ie \\n[www-html] \{\
. ie '\\$3'' \
. ds \\$0:after \&
@@ -339,16 +341,30 @@ www functionality. It should work with any macro set.
. el \{\
. if !r ps4html .ad l
. ie '\\$2'' \{\
-. ie \\n[.color] \
-. nop \%\[la]\m[blue]\f[C]\\*[\\$0:adr]\f[]\m[]\[ra]\\$3
-. el \
-. nop \%\[la]\f[CB]\\*[\\$0:adr]\f[]\[ra]\\$3
+. ie '\\$1'' \{\
+. ie !'\\$3'' \
+. nop \\$3
+. \}
+. el \{\
+. ie \\n[.color] \
+. nop \%\[la]\m[blue]\f[C]\\*[\\$0:adr]\f[]\m[]\[ra]\\$3
+. el \
+. nop \%\[la]\f[CB]\\*[\\$0:adr]\f[]\[ra]\\$3
+. \}
. \}
. el \{\
-. ie \\n[.color] \
-. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3
-. el \
-. nop \f[B]\\$2\f[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3
+. ie '\\$1'' \{\
+. ie \\n[.color] \
+. nop \m[blue]\\$2\m[]\\$3
+. el \
+. nop \f[B]\\$2\f[]\\$3
+. \}
+. el \{\
+. ie \\n[.color] \
+. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3
+. el \
+. nop \f[B]\\$2\f[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3
+. \}
. \}
. if !r ps4html .ad
. \}
@@ -385,16 +401,30 @@ www functionality. It should work with any macro set.
. \}
. el \{\
. ie '\\$2'' \{\
-. ie \\n[.color] \
-. nop \%\m[blue]\f[C]\\$1\f[]\m[]\\$3
-. el \
-. nop \%\f[CB]\\$1\f[]\\$3
+. ie '\\$1'' \{\
+. ie !'\\$3'' \
+. nop \\$3
+. \}
+. el \{\
+. ie \\n[.color] \
+. nop \%\m[blue]\f[C]\\$1\f[]\m[]\\$3
+. el \
+. nop \%\f[CB]\\$1\f[]\\$3
+. \}
. \}
. el \{\
-. ie \\n[.color] \
-. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3
-. el
-. nop \f[B]\\$2\f[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3
+. ie '\\$1'' \{\
+. ie \\n[.color] \
+. nop \m[blue]\\$2\m[]\\$3
+. el \
+. nop \f[B]\\$2\f[]\\$3
+. \}
+. el \{\
+. ie \\n[.color] \
+. nop \m[blue]\\$2\m[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3
+. el
+. nop \f[B]\\$2\f[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3
+. \}
. \}
. \}
..