Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scoping highlighting tags to the mocha element
I'm not sure whether I'm missing an edge case or not, but this solves my issue and it makes sense to me that this is what we would want it to be anyway. Everything should be scoped to the `#mocha` element anyway. My use case is I have a collection of components and I have tests for them. I have a site that shows the component, an example, and the test. The example and test is interactive and runs on the page. Without this change, mocha will highlight all my other code tags on the page which messes things up. Here's an example of this change working on my page: http://kent.doddsfamily.us/kcd-angular/#/kcd-dynamic-attr#spec (see the spec toward the bottom)
- Loading branch information
414d793
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edge case for ya: If you're using something other than the default web reporter, this is going to blow up. For ex: https://github.com/eeroan/WebConsole-reporter
#1363
414d793
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does my change make a difference in that case? Does this code even run with that reporter? Seems like there's no need to highlight tags in the console......