-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
General improvements and fixes #44
Conversation
Technically, styled"{():}" and styled"{( ):}" are legal instances of the documented grammar. Found by Supposition.jl.
Checking the value of the next char is a very frequent operation, and one must always be careful to confirm that the stateful char iterator is not empty before doing so. To improve readability, clarity, and make it harder to forget this imported check, I'm introducing a helper function for this task.
This catches two edge cases around the handling of space around inline face attributes in the markup grammar.
In a similar style to the isnextchar introduction, this new predicate function enhances the clarity of the markup parsing code.
At some point I just started typing "whitespace", when I meant to use "ws", as "whitespace" isn't even defined anywhere in the grammar.
When making the macro-oriented markup parser into a hybrid macro/function-oriented FSM, I looked around all the instances of `Expr` to find code that needed updatig. In that process, this QuoteNode used for weight was missed.
ca795cb
to
e2adc15
Compare
Progress update: I've added ~100 new tests over ~400 lines, and written a ~200 line fuzzer using All in all, I'm very happy with how this sprint of work is shaping up. |
f37b0d9
to
746adc6
Compare
3f04879
to
2966f9d
Compare
Having it augment/replace the faces dict with the same method name seems too potentially confusing. It is likely a better idea to copy the withenv/setenv split if we want a "swap out the faces dict" method in the future.
These two functions are designed as user-facing, and really should be part of the advertised API surface (and the styled function already was in the docs).
Co-authored-by: Lazaro Alonso <[email protected]>
Based on feedback received from Sundar
This was the only aspect of inline face attributes that couldn't be interpolated — a bit of an oversight.
3984156
to
5226f29
Compare
Because it's invalid for a symbol to contain 0x00. julia> Symbol("\0") ERROR: ArgumentError: Symbol name may not contain \0
6d223be
to
d55fd33
Compare
Ok, I think we're at the point where this should be merged now. |
6a84470
to
67f0ff6
Compare
67f0ff6
to
9c015e2
Compare
I'm doing a big batch of changes to tighten up the current code and test it better, making a few fixes along the way.