Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Honestly davido, I do have a plan. The only thing I don't know is how to change the look of the text.
You have two problems here. You want to invent a markup. Since you don't show any, that's up to you. You have to write a parser for that markup.

The second problem is you want to change the look of the text. But where is that text to be displayed? if in a terminal, then Term::ANSIColor (which you already mentioned) would be a good choice. but you said above that this module doesn't help you. you only forget to mention why.

So what do you actually want? if you want help you need to add more information. text is just text and has no format. if you add terminal escape sequences to it, then in a terminal it can be bold, coloured. displaying terminal escape sequences in a browser or in Tk is of no use, on the other hand.

See Parse::BBCode (one of my modules) for example. It's a simple markup, and the module parses it, returns a parse tree and renders it to HTML or text or any format you define.

In reply to Re^3: Make a Markup Method in Perl? by tinita
in thread Make a Markup Method in Perl? by perl.j

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found