Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: What do Monks Recommend For HTML Reformatters?

by tune (Curate)
on Dec 01, 2003 at 09:40 UTC ( #311200=note: print w/ replies, xml ) Need Help??


in reply to What do Monks Recommend For HTML Reformatters?

This topic is pretty interesting to me too. I am coding in Mason right now, and wondering if HTMLTidy will respect the Mason blocks or messing them up. Has anyone any experience with this?

--
tune


Comment on Re: What do Monks Recommend For HTML Reformatters?
Re^2: What do Monks Recommend For HTML Reformatters?
by Aristotle (Chancellor) on Dec 01, 2003 at 17:28 UTC

    Depends on how Mason (which I have no idea about) handles embedding its own stuff in the markup. If it uses processing instructions (<?foo ?>) then HTMLTidy may reindent the opening part of the tag (<?foo) at will and may reindent any following lines as a block, but it won't touch the content. For the majority of languages that means there should be no change, though it might not be what you want.

    Unfortunately - and that is the one thing that annoys me about HTMLTidy -, there's no way to specify a list of candidate tags for reindenting or a list of tags not to reindent.

    Makeshifts last the longest.

      Mason is having several forms to markup its own stuff. And it's pretty unique. E.g.
      % my $str = "This line is Perl until the linefeed."; # cannot contain +whitespace at the beginning!!! <%perl> my $str2 = "This is a Perl block"; </%perl> <%args> $a # this is a special block $b </%args> <h1>Hello <% $monkname %>!</h1> It is <& /lib/mason_components/weather_forecast.mas, fmt => 'Celsius' +&> celsius degrees outside!
      etc. I guess I will try to run Tidy, but not confident about it at all :-/

      --
      tune

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://311200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2015-07-06 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls