Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of X<> formatting code is surprising #4940

Open
p6rt opened this issue Dec 26, 2015 · 2 comments
Open

Parsing of X<> formatting code is surprising #4940

p6rt opened this issue Dec 26, 2015 · 2 comments
Labels
RFC Request For Comments

Comments

@p6rt
Copy link

p6rt commented Dec 26, 2015

Migrated from rt.perl.org#127039 (status was 'new')

Searchable as RT127039$

@p6rt
Copy link
Author

p6rt commented Dec 26, 2015

From @autarch

Given the Pod "X<pig|pigs; piggies ; porcine>" it's turned into the following object​:

  Pod​::FormattingCode.new(type => "X", meta => [["pigs"], [" piggies "], [" porcine"]], config => {}, contents => ["pig"])

I'm not sure exactly what I expect here, but it's not this. If the compiler is going to parse the semicolons, then shouldn't it also strip whitespace around the semicolons? S26 doesn't specifically mention whitespace, but it's example is "X<hash|hashes, definition of; associative arrays>" so it seems reasonable to strip leading and trailing whitespace from each term.

Besides that, I don't see why meta is an array of single element arrays. I'd expect it to be an array of strings.

@p6rt
Copy link
Author

p6rt commented Dec 26, 2015

From @autarch

On Sat Dec 26 15​:16​:04 2015, autarch wrote​:

Besides that, I don't see why meta is an array of single element
arrays. I'd expect it to be an array of strings.

I note that when you have "X<foo|foos>" then the code's .meta is an array containing a single string, as expected.

@p6rt p6rt added the RFC Request For Comments label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

1 participant