-
Notifications
You must be signed in to change notification settings - Fork 315
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 an error on unrecognized pl-* elements #2279
Comments
I think that implementing this is actually somewhat problematic. The traversal function traverses the inner |
I agree this may be a problem if course staff had intentionally been using |
On second thought, I haven't looked at the renderer in detail recently. If the expectation is that every |
IIRC the traversal algorithm always processes parents before children, so even if you have a |
Maybe I'm not reading your comment correctly, but did you mean it processes children before parents? (Actually, I should just study the implementation...) |
Nope, I meant parents first. Studying the implementation is definitely recommended! |
@echuber2 This is actually a fairly easy change to play around with, since this is really just adding an if statement. All that I remember from doing this is that I was getting errors about unrecognized child elements that started with |
@nwalters512 is this the type of warning that would be better suited to being behind a feature flag? Looking at this again, I'm wondering if bundling this with the Python renderer is the way to go (as I did in #7983), since the new renderer is still opt-in only. Having a feature flag for just this warning feels like a very small change to put behind something like that, and enabling it for all courses at once is probably going to throw a ton of errors. |
I agree that if we want to do this, we should do it with the standard rendering pipeline. I'm not really sure how we'd go about rolling out this change if it was behind a feature flag. How do we decide which courses to enable it for? And at any rate, we'll eventually have to turn it on for everyone. |
In
traverseQuestionAndExecuteFunctions()
insidefreeform.js
, ifvisitNode()
finds an element withtagName
starting withpl-
that we don't recognize, then it should throw an error rather than silently proceeding.The text was updated successfully, but these errors were encountered: