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
MarkupText - Invalid Characters #8
Comments
Good catch. I didn't think of implementing a sanity check, knowing that Pango would simply fail and the error message was rather clear. I will gladly do it, but won't be able for the next few days. If you think it cannot wait, I am fine with you fixing it. Remember that the color and gradient part must be parsed and stripped before the check, as they are not supported by Pango. (Just to be sure, but you would probably have thought of that anyway.) |
No hurry for me, just do it when you are free :)
If Pango had tried to exit, it would have made Python Crash, at least it just warns or else things would be difficult. |
I know. I tested that beforehand. 👍 |
* Add validation for Pango Markup * Changes after code review * Test for markup validation * Better error messages if tests fail * Lint * Dummy commit to trigger check * Removing dummy comment * Lint fix and remove unecessary cdef extern block * remove unnecessary guint32 definition Co-authored-by: Syrus Dark <naveen@syrusdark.website>
Just tried this
I see an empty SVG file created with the following warnings over at console.
Suggestion: Use
pango_parse_markup
and raise an error when markup is invalid. @PhilippImhof are you interested in doing this, or else I will do.The text was updated successfully, but these errors were encountered: