-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow tabs in DocTestParser #24
Comments
Can you share some examples of these non-Python blocks? |
Absolutely. I use the reStructuredText block to illustrate a text format that happens to use tabs. Here's an (actual) example (source): To illustrate, let us consider the following CHAT utterance with its ``%mor``
tier::
*XXA: 喂 遲 啲 去 唔 去 旅行 啊 ?
%mor: e|wai3 a|ci4 u|di1 v|heoi3 d|m4 v|heoi3 vn|leoi5hang4 y|aa3 ?
I'm not sure -- I haven't dug into the internals of doctest / Sybil too much. For my use case. I'd want doctest / Sybil to simply ignore blocks like this, which the commit I referred to above would allow when |
Ah, so the problem is actually that doctest is spotting tabs in blocks it won't even match... |
43445d8 should resolve this, it'll be in a 2.0.1 release as soon as CI finishes running. |
Thank you for the quick fix! I've just upgraded to Sybil 2.0.1 and my CI also passed as well. Thanks again! |
Hello, thank you very much for this nifty library! In my use case, there are non-Python blocks that contain tabs but these tabs should just be ignored. My workaround is to let
DocTestParser
take anallow_tabs
kwarg in my fork:https://github.com/jacksonllee/sybil/commit/68944ab9881c8af70254317f36ae996e32faf25c
If there's any interest, I'd be more than happy to contribute a pull request so that it's available in the upstream source here as well.
The text was updated successfully, but these errors were encountered: