-
Notifications
You must be signed in to change notification settings - Fork 572
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
Better content hiding; template & testing improvements #734
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this makes sense to me. One suggestion inline.
out_regex = r"Out\[(.*)\]:" | ||
|
||
assert not re.findall(in_regex, output) | ||
assert not re.findall(out_regex, output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add a corresponding test that the in and out prompts are produced with the default config? It looks like we already have such tests for HTML and Latex, but not for asciidoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
Great :-) |
Closes #733.
It adds a test to make sure this behaviour does not occur again; I also tested for this explicitly in the html and AsciiDoc exporters (since their templates have additional prompt hiding logic).
I also improved indenting in some of the templates and fixed a bug in the logic for hiding input cells in the basic html template.
I removed some unnecessary conditions for hiding prompts in the html template.
NB: I made some changes to the AsciiDoc template in order to simplify its logic as well… but they ended up being substantial enough that I don't think they should be included in this context (especially since I don't have a functioning version of AsciiDoc on my comp; with it relying on python 2.6… and no later!). I'll make a PR with those changes at some point near in the future…but it definitely seems like the current template is broken considering how it strips space from output areas.