Re: Possible libyaml bug
Kirill Simonov <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Ingy, Ingy dot Net wrote: > I think this may be the first bug I've found in libyaml: > > > ysh -MYAML::XS > Welcome to the YAML Test Shell. Type ':help' for more information. > > ysh > --- > " > yaml> > -- > yaml> > " > yaml> > ... > $VAR1 = ' -- '; > ysh > --- > " > yaml> > --- > yaml> > " > yaml> > ... > YAML Load Failed: > YAML::XS::Load Error: The problem: > > found unexpected document indicator > > was found at document: 1, line: 2, column: 1 > while scanning a quoted scalar at line: 1, column: 5 > ysh > > The spec requires that continuation lines of a flow scalar are indented with at least one space. LibYAML relaxes this rule by allowing multi-line flow scalars not to be indented, but it still checks that document start/end indicators do not appear at the beginning of the line. The reasoning for this check was to allow an application to split a YAML stream into separate documents without using a full YAML parser (whether or not this feature is practical, I'm not sure). Thanks, Kirill ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/