Re: feature request for libyaml: support "\/" escape sequence for YAML 1.2/JSON compatibility
Ingy dot Net <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CAHJtQJ5aBQsKt0rcaxEooVDFn-PbHZ1v0sTuTOm747ABh4GCyA@mail.gmail.com> |
Hi Patrick, This was added to libyaml a couple months ago: https://github.com/yaml/libyaml/commit/66bcb985569e7b643823c9ba1aeb47892583aeef Note that it's on the yaml-1.2 branch. Also note that this new github repo is the canonical source at this time. Cheers, Ingy On Wed, Mar 27, 2013 at 5:31 PM, Patrick Pelletier <[email protected]>wrote: > I attempted to submit a feature request ticket for libyaml: > > http://pyyaml.org/newticket?component=libyaml > > but it rejected my ticket, telling me it was spam. (I could go off on a > whole rant about how so-called "spam filtering" makes it impossible for > legitimate users to get anything done these days, but that would be > off-topic.) > > Anyway, since I can't submit a ticket, sending the feature request to > this list seemed like the next-best thing. > > Here is the text of the ticket I attempted to submit to libyaml: > > YAML 1.2 adds support for the escape sequence "\/", which was not > present in YAML 1.1: > > http://www.yaml.org/spec/1.2/spec.html#id2776092 > > YAML 1.2 added this escape sequence in order to be compatible with JSON. > (Since YAML's goal is to be a superset of JSON.) > > Although libyaml is only a YAML 1.1 parser, it would be nice to have > this feature, and adding it shouldn't cause any trouble with parsing > YAML 1.1. > > This is all that's needed: > > {{{ > --- a/scanner.c~ > +++ b/scanner.c > @@ -3164,6 +3164,10 @@ yaml_parser_scan_flow_scalar(yaml_parser_t > *parser, yaml_ > *(string.pointer++) = '\\'; > break; > > + case '/': > + *(string.pointer++) = '/'; > + break; > + > case 'N': /* NEL (#x85) */ > *(string.pointer++) = '\xC2'; > *(string.pointer++) = '\x85'; > }}} > > --Patrick > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Yaml-core mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/yaml-core > ------------------------------------------------------------------------------ Own the Future-Intel(R) Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 _______________________________________________ Yaml-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/yaml-core