Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^6: Thanks to Ikegami, Chromatic & Corion

by Logicus
on Nov 02, 2011 at 02:33 UTC ( #935270=note: print w/replies, xml ) Need Help??


in reply to Re^5: Thanks to Ikegami, Chromatic & Corion
in thread Thanks to Ikegami, Chromatic & Corion

The escapes need to be the other way around!

my %escapes = ( '&lab;' => '<', '&rab;' => '>', '&lcb;' => '(', '&rcb;' => ')', '&lsb;' => '[', '&rsb;' => ']' );

I need a new escapes_re, because now it's simply destroying all the brackets!

Replies are listed 'Best First'.
Re^7: Thanks to Ikegami, Chromatic & Corion
by Anonymous Monk on Nov 02, 2011 at 02:37 UTC

    I need a new escapes_re, because now it's simply destroying all the brackets!

    Eeeep!

      Oh, hello __YOU__, how are you?

      Trolled anyone who cares lately?

        You can't troll a troll
Re^7: Thanks to Ikegami, Chromatic & Corion
by Logicus on Nov 02, 2011 at 02:37 UTC

    Got it!

    my %escapes = ( '&lab;' => '<', '&rab;' => '>', '&lcb;' => '(', '&rcb;' => ')', '&lsb;' => '[', '&rsb;' => ']' ); my $escapes_re = qr/&[lr][acs]b;/; $aXML =~ s/($escapes_re)/$escapes{$1}/g;

      That won't work. you need to handle those sequences, <special> and <post_include> at the same time, not before (which would break "&lab;special>lab&lab;/special>") or after (which would break "<special>lab</special>"). I've covered what would work elsewhere.

        But I can't think of any reason at all that you would need those sequences in the course of developing an aXML based system! They are pretty much for the plugins only, and the only use I've found for them so far is outputting complex litteral strings which contain aXML/Perl... a feature I've never needed until doing the PerlNights project.

        Look, why don't I email you over a copy of the the PerlNights build as it stands right now, and then you can have a look at a proper working aXML system that renders an output very similar to PerlMonks. Then you can see why I never really gave the specials much thought at all, because I never needed to.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://935270]
help
Chatterbox?
[karlgoethebier]: ... the ultimate coding experience for everyday people...
[karlgoethebier]: ...like me
[marto]: what a mess
[karlgoethebier]: perhaps i need a zerial?
[Corion]: marto: Heh - I think that's a nice contractual trap, "you will not use other gods/engines besides ours" ;)
[Corion]: But if the base intention was to have CIG as "co-developers" who (have to) contribute changes back to the mainline, it makes sense to have them use no other engine
[marto]: yes, I hear that development house has been on its last legs for a couple of years now
[Corion]: Is anybody aware of what makes Android Oreo better than Android Nougat? I'm not sure if the architectural changes (etc) are there already that make upgrading an Oreo-kernel phone to a newer Android userland (Lineage OS) version feasible
[Corion]: Yeah, CryTek got blindsided (or whatever) by Unity and Unreal Engine being zero cost, and the CryTek documentation being bad/nonexistent I think
[Corion]: "zero monetary cost", because of course, it's gratis only if your time has no value :)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-12-14 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (389 votes). Check out past polls.

    Notices?