This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: search-replace linefeeds
- From: Norman Walsh <ndw at nwalsh dot com>
- To: Ethan Vaughn <ethan at gurulabs dot com>
- Cc: docbook at lists dot oasis-open dot org
- Date: Thu, 13 Feb 2003 20:12:46 -0500
- Subject: DOCBOOK: Re: search-replace linefeeds
- References: <200302041807.42918.ethan@gurulabs.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/ Ethan Vaughn <ethan@gurulabs.com> was heard to say:
| i'm trying to translate a <screen> block into an html table but can't figure
| out how to get the linefeed replaced by an html tag (like </td>). Maybe i'm
| just going at it all wrong. Here's a sample of the xml:
|
| <screen>
| <prompt># </prompt><userinput><command>telnet</command></userinput>
| Trying 192.168.0.1...
| Connected to 192.168.0.1
| </screen>
|
| To test it i'm trying to search linefeeds out of the content and replace with
| <br>. My goal however is to be able to translate each line into an HTML table
| row so i can tag certain lines with callouts. Anyway, that's not the issue
| (yet).
You're going to trip over all sorts of ugly issues. The extension
functions I wrote to do line numbering and callouts would be one place
to start.
Whatever solution you decide to use, make sure you test the case were
linebreaks occur inside markup.
<screen><prompt># </prompt><userinput><command>telnet
i wasn't expecting a linebreak here</command>
where you?</userinput>
</screen>
Be seeing you,
norm
- --
Norman Walsh <ndw@nwalsh.com> | Perhaps, but let's not get bogged
http://www.oasis-open.org/docbook/ | down in semantics.--Homer J.
Chair, DocBook Technical Committee | Simpson, BABF07
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
iD8DBQE+TEKOOyltUcwYWjsRAo0bAJ9YXmzYy9+ivXgDoMb+cmO2s+7cPQCfdCN+
2+Slcrrm7N1jfrsyKMP5Vc4=
=zGl1
-----END PGP SIGNATURE-----