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

Invalid highlighting in doc comments #73

Open
kissarat opened this issue Sep 11, 2016 · 2 comments
Open

Invalid highlighting in doc comments #73

kissarat opened this issue Sep 11, 2016 · 2 comments

Comments

@kissarat
Copy link

https://github.com/phpbb/phpbb/blob/9596db9b8869d2d9d68112ac7aadf394545d2811/phpBB/phpbb/auth/auth.php#L216
screen shot 2016-09-08 at 4 34 10 pm 1
I was redirected here from github support
screen shot 2016-09-11 at 7 53 54 am

@infininight
Copy link
Member

So the highlighting here was designed with PHPDoc in mind, though I believe there are other documentation generators for PHP. According the the PHPDoc documentation each line should start with a *, so the invalid color is there is denote this restriction.

Does PHPBB use a different documentation generator or is this restriction not as ironclad as the documentation suggests?

@Tenzian
Copy link

Tenzian commented Oct 23, 2017

There's a good discussion about this issue (which also cropped up in sublime text) at sublimehq/Packages#68.

The solution there was:

Multiline comments that start with /** are no longer an error if each line does not start with *,
however, PHPDoc @ keywords are also not highlighted in that situation.

The particular instance of this style of doc block not being invalid I've encountered is zircote/swagger-php#326 where you're trying to use descriptions longer than PSR-2 recommendations for line length and keep both swagger-php and php cs happy at the same time. 😄

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

No branches or pull requests

3 participants