formatting HTML in a gtksourceview widget
Dirk Koopman
djk at tobit.co.uk
Wed May 26 19:11:11 BST 2010
On 26/05/10 16:41, Tom Hukins wrote:
> On Wed, May 26, 2010 at 04:23:41PM +0100, Dirk Koopman wrote:
>> So it seems I shall have to format it first. HTML::Tidy seems only to do
>> checking.
>
> I used to think this too:
> http://use.perl.org/~tomhukins/journal/27445
>
> I've not used HTML::Tidy in a while, but I suspect its clean() method
> does what you want.
>
Your suspicion is correct. Now all I have to do is to get it to render
in a decent font.
The documentation on HTML::Tidy is less than helpful:
clean( $str [, $str...] )
Cleans a string, or list of strings, that make up a single HTML file.
Returns the cleaned string as a single string.
Not exactly obvious is it?
Ta muchly for the tip.
Dirk
More information about the london.pm
mailing list