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

Fix #396 #1220

merged 2 commits into from Mar 1, 2015


None yet
1 participant

crabmusket commented Feb 22, 2015

For #396. The docblock parsing rule was looking for /// then anything not /, then a bunch of characters till a newline. That means it would see this:

function hello() {}

as all being on one line, if using Linux newlines (because the \n matched the single 'not /', then the function definition matched the next line.

This PR corrects the issue by doing two things. First, it makes the rule stricter, by requiring that the next character after a /// not be any of /, \n and \r. This stops the issue, but would mean that all docblocks had to have a character after the ///. Second, we make the entire contents of the line optional. This allows empty docblock lines.

Oh, I also changed the newline spec at the end to be [\n\r]+ instead of [\n\r]* which seems more sensible.

crabmusket added some commits Feb 22, 2015

Fix docblock parsing rule.
We first require that the first character after a /// not be a newline,
in addition to it not being another /. Then we make the whole contents
of the line optional, so we can handle empty lines.

@crabmusket crabmusket referenced this pull request Feb 22, 2015


Fix issue 396 #1156

@crabmusket crabmusket added the Bug label Feb 22, 2015

@crabmusket crabmusket added this to the 3.7 milestone Feb 22, 2015

crabmusket added a commit that referenced this pull request Mar 1, 2015

@crabmusket crabmusket merged commit 18cc910 into GarageGames:development Mar 1, 2015

@crabmusket crabmusket deleted the crabmusket:fix-#396 branch Mar 1, 2015

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