-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Throw error on non-string input #682
Conversation
Returning |
In my case I was using Having Well...you know how you post something and then fix your bug?
Does the trick without the |
A reasonable alternative could be to return |
I updated the pull, adding more information for the developer.
The code tries to find the object type passed to marked as best it can. This works with builtin objects only, not with user defined classes. (I could work out some code for this too, using About the "missing tests" label, there's no quick&easy way to test for this, since the test system put in place works by submitting textual input to marked and comparing the output with the expected one. This fix doesn't cover that type of issue. |
@Feder1co5oave: Is there a way to test the throw-catch using our current testing setup? This looks great to me - especially with the updated messages - just want to make sure we've got our bases covered on the automated QA. |
We'd have to go through the test script itself and put in this special test
case. Dirty but doable(?)
|
@Feder1co5oave: Would you mind? Let's see how "dirty" it ends up being. I don't think it's a deal-breaker and if it's gonna be too difficult to put in and throw away - no worries. |
I'll dig into that tomorrow. Sleepytime now.
|
Going to merge momentarily. Small change - fixes a lot of things. Just going to confirm a couple of things. |
Still seeing two failing tests. What did I miss? |
One ( The other one ( diff --git a/test/new/cm_link_defs.html b/test/new/cm_link_defs.html
index dec397a..9245002 100644
--- a/test/new/cm_link_defs.html
+++ b/test/new/cm_link_defs.html
@@ -97,7 +97,7 @@ should render to
<h3 id="example-179">Example 179</h3>
-<h1 id="-foo179-"><a href="/url">Foo179</a></h1>
+<h1 id="foo179"><a href="/url">Foo179</a></h1>
<blockquote>
<p>bar</p>
</blockquote> |
Throw error on non-string input
I agree with what @scottgonzalez said here: #417 (comment)I chose to returnnull
instead of an empty string in order to let the user know there's a problem, and that it's probably his fault.Behavior:
The
TypeError
is still thrown if a user calls manuallyLexer.lex
and thenParser.parse
, but I think it's her/his business at this point.fixes #168 fixes #417 fixes #447 fixes #291 fixes #442 fixes #635 fixes #658
fixes #681 fixes #755 fixes #758 fixes #776 fixes #787 fixes #794 fixes #802
fixes #934 fixes #867 fixes #903 fixes #955 fixes #1021 fixes #927 fixes #866
fixes #614 fixes #752