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

Parser stops at the first dot #190

Open
grappler opened this issue Feb 23, 2017 · 3 comments
Open

Parser stops at the first dot #190

grappler opened this issue Feb 23, 2017 · 3 comments

Comments

@grappler
Copy link
Member

In the is_singular() summary the text does not end at the first dot.
Is the query for an existing single post of any post type (post, attachment, page, ... )?

https://developer.wordpress.org/reference/functions/is_singular/

I also created a core ticket as it may be quicker to correct the inline docs then the parser. https://core.trac.wordpress.org/ticket/39948

I have not checked for any other cases.

@JDGrimes
Copy link
Contributor

I think this is just a result of phpDocumentor following the expected syntax for the summary, which is supposed to be a single sentence ending in a full stop. I guess it just assumes that everything after the first period (the first sentence), is a part of the long description.

So this is just the behavior of phpDocumentor, though I guess we could work around it in the parser if we wanted to.

@GaryJones
Copy link
Member

I think this is just a result of phpDocumentor following the expected syntax for the summary, which is supposed to be a single sentence ending in a full stop.

Not quite:

The short description is started from the first character until a dot is encountered followed by a newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing errors).
-- phpDocumentor\Reflection\DocBlockFactory

The unit tests don't appear to test the case of their being multiple dots in the summary.

Here's the regex, which at first glance, shouldn't break with multiple dots.

@GaryJones
Copy link
Member

Saying that, it looks like it has been reported upstream anyway: phpDocumentor/ReflectionDocBlock#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants