-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Imbalance in function source opening/closing shown in markdown/html reports #2208
Comments
On further reflection, I don't think the inclusion of
So, I ended up finding where this is being cleaned and it certainly looks like my regex error theory; I plan on submitting a pull request to tweak it and correct the various oddities. |
This was referenced Sep 23, 2018
1 task
1 task
This was referenced Dec 23, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bit of an edge case since normally test functions are not named (in the sense of the function itself having a name) and one does not usually compress the body of the function due to readability/structure, but for what it's worth, this code...
...yields this output when run with the markdown reporter...
has the head of the function but not the closing brace.
does the same thing with a function declared elsewhere.
has the closing brace of the function but not the head.
does not have the closing brace because of just one space after the contents.
has the closing brace if the function body is entirely empty.
}
does not have the closing brace because of just one space in the body.
I would guess that the inclusion of
function name() {
in named functions is intentional, so that references to the name from within the function are clear; but in any case the closing brace being included or not should match whether the function name/opening is included, rather than whether there's whitespace before it.The text was updated successfully, but these errors were encountered: