Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Pretty Print for code tags (js)

by jmlynesjr (Hermit)
on May 28, 2016 at 13:33 UTC ( #1164388=note: print w/replies, xml ) Need Help??


in reply to Re: Pretty Print for code tags (js)
in thread Pretty Print

Well....it was worth a try. :)

I'll just have to try and remember to pre-expand code before posting.

James

There's never enough time to do it right, but always enough time to do it over...

Replies are listed 'Best First'.
Re^3: Pretty Print for code tags (js)
by LanX (Bishop) on May 28, 2016 at 14:34 UTC
    actually it's not really difficult to add something like a s/\t/    /g to Good Intentions: Wikisyntax for the Monastery

    The function exclude must be called with a 4th argument untabify in the line with text = exclude(text,/<(c|code)>[^]*?<\/\1>/g,"code",untabify);

    If defined apply the callback to substring = transform(substring) before exclusions.push( [placeholder,substring] ); is done.

    like this users can do personal adjustments to the way the transformation is done (not everyone wants 4 spaces for tab) in untabify()

    Just documenting it for future implementation if a real demand rises.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1164388]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-12-11 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (318 votes). Check out past polls.

    Notices?