Step 1. Find <ulink url="mailto:...">...</ulink> and change the <ulink>
to <email>. Can't do this globally. Some of the links are odd (i.e,. the link is not their e-mail address but is their name, eg <ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink> which would turn to <email>Nik Clayton</email> which isn't very useful. Ignore these ones, and do the others. (i.e., the ones that look like <ulink url="mailto:nik@freebsd.org">nik@freebsd.org</ulink> ) This Emacs regexp does the job. Search for: <ulink\s-+url="mailto[^>]+>\([^<]+\)</ulink> Replace with: <email>\1</email> Step 2. A lot of the <email>...</email> sets will have '<' and '>' embedded in them (as entities). These can be removed, since the stylesheet will add them; Search for: <email><\([^&]+\)></email> Replace with: <email>\1</email> Step 3. The trick now is to turn <ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink> into Nik Clayton <email>nik@freebsd.org</email> This step could (possibly) have been done first, and then steps 1 and 2 could be done globally. I haven't done this because of concerns about the ordering of names within languages. This transformation is fairly simple in English, I've no idea what it's like in Japanese. Search for: <ulink\s-+url="mailto:\([^"]+\)">\([^<]+\)</ulink> Replace with: \2 <email>\1</email> Step 4. Remove leading and trailing spaces that may have slipped in Search for: <email>\s-+ Replace with: <email> Search for: \s-+</email> Replace with: </email>
This commit is contained in:
parent
950e361ac7
commit
84712fedb0
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3680
4 changed files with 1405 additions and 2607 deletions
en/handbook
en_US.ISO8859-1/books/handbook
en_US.ISO_8859-1/books/handbook
|
@ -492,4 +492,56 @@ for example,
|
|||
yes---or no? = em-dash = —
|
||||
0, 1, and -1 = minus sign = −
|
||||
|
||||
49. Step 1. Find <ulink url="mailto:...">...</ulink> and change the <ulink>
|
||||
to <email>.
|
||||
|
||||
Can't do this globally. Some of the links are odd (i.e,. the link
|
||||
is not their e-mail address but is their name, eg
|
||||
|
||||
<ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink>
|
||||
|
||||
which would turn to
|
||||
|
||||
<email>Nik Clayton</email>
|
||||
|
||||
which isn't very useful. Ignore these ones, and do the others.
|
||||
(i.e., the ones that look like
|
||||
|
||||
<ulink url="mailto:nik@freebsd.org">nik@freebsd.org</ulink>
|
||||
|
||||
This Emacs regexp does the job.
|
||||
|
||||
Search for: <ulink\s-+url="mailto[^>]+>\([^<]+\)</ulink>
|
||||
Replace with: <email>\1</email>
|
||||
|
||||
Step 2. A lot of the <email>...</email> sets will have '<' and '>'
|
||||
embedded in them (as entities). These can be removed, since the stylesheet
|
||||
will add them;
|
||||
|
||||
Search for: <email><\([^&]+\)></email>
|
||||
Replace with: <email>\1</email>
|
||||
|
||||
Step 3. The trick now is to turn
|
||||
|
||||
<ulink url="mailto:nik@freebsd.org">Nik Clayton</ulink>
|
||||
|
||||
into
|
||||
|
||||
Nik Clayton <email>nik@freebsd.org</email>
|
||||
|
||||
This step could (possibly) have been done first, and then steps
|
||||
1 and 2 could be done globally. I haven't done this because of
|
||||
concerns about the ordering of names within languages. This
|
||||
transformation is fairly simple in English, I've no idea what
|
||||
it's like in Japanese.
|
||||
|
||||
Search for: <ulink\s-+url="mailto:\([^"]+\)">\([^<]+\)</ulink>
|
||||
Replace with: \2 <email>\1</email>
|
||||
|
||||
Step 4. Remove leading and trailing spaces that may have slipped in
|
||||
|
||||
Search for: <email>\s-+
|
||||
Replace with: <email>
|
||||
|
||||
Search for: \s-+</email>
|
||||
Replace with: </email>
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue