Path: usenet.cise.ufl.edu!huron.eel.ufl.edu!usenet.eel.ufl.edu!uky.edu!atl-news-feed1.bbnplanet.com!washdc3-snh1.gtei.net!su-news-hub1.bbnplanet.com!news.gtei.net!newsfeed.corridex.com!nntp2.savvis.net!inetarena.com!not-for-mail From: Gareth Rees Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules Subject: ANNOUNCE: HTML::FromText 1.003 Followup-To: comp.lang.perl.modules Date: 3 May 1999 15:24:22 GMT Organization: Canon Research Centre Europe Lines: 85 Approved: merlyn@stonehenge.com (comp.lang.perl.announce) Message-ID: <7gkf36$fek$1@play.inetarena.com> NNTP-Posting-Host: halfdome.holdit.com X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content. Xref: usenet.cise.ufl.edu comp.lang.perl.announce:296 comp.lang.perl.modules:10888 NAME HTML::FromText - mark up text as HTML SYNOPSIS use HTML::FromText; print text2html($text, urls => 1, paras => 1, headings => 1); DESCRIPTION The text2html function marks up plain text as HTML. By default it converts HTML metacharacters into the corresponding entities. More sophisticated transformations, such as splitting the text into paragraphs or marking up bulleted lists, can be carried out by setting the appropriate options. The following transformations are available: * Turn HTML metacharacters into HTML entities. * Spot URLs and convert them to links. * Spot e-mail addresses and convert them to `mailto:' links. * Preserve line breaks. * Expand tabs and preserve spaces throughout the text. * Mark up words surrounded with *asterisks* as bold. * Mark up words surrounded with _underscores_ as underlined. * Format the text as paragraphs. * Spot paragraphs where every line begins with whitespace, and mark them up as block quotes. * Spot bulleted paragraphs and mark them up as an unordered list. * Spot numbered paragraphs and marks them up as an ordered list. * Spot headings (paragraphs starting with numbers) and mark them up as headings of the appropriate level. * Format the first paragraph of the text as a first-level heading. INSTALLATION perl Makefile.PL && make && make test && make install HISTORY 1.001 Original CPAN release. 1.002 Much improved recognition of e-mail addresses with special characters, as specified by RFC822. When 'urls' is supplied, the prefix mailto: on email addresses is preserved. New option 'pre' wraps text in
...
. When anchor text is in fixed-width font, the element is inside the element, as required by the HTML DTD. 1.003 Recognize '&' in email addresses, as specified by RFC822. BUGS There are lots of transformations it doesn't do. AUTHOR Gareth Rees . AVAILABLE FROM http://www.cpan.org/authors/id/G/GD/GDR/HTML-FromText-1.003.tar.gz COPYRIGHT Copyright (c) 1999 Canon Research Centre Europe. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -- Gareth Rees .