quailjs/quail

data-cacheid aren't cleaned up before code snippets are taken

Closed this issue · 3 comments

I've been finding a lot of data-cacheid attributes in the code snippets returned by Quail. I think this is caused by the color tests. This may be confusing to users.

Using elem.dataset or jQuery.data() should keep these out of the DOM.

Tried using dataset but it threw TypeError: 'undefined' is not an object (evaluating 'element.dataset.cacheId') during testing.

Pretty sure I'm missing something obvious here, but the jQuery .data() method seems to work and gets rid of these data-cacheid attributes in reports.

Fixed by PR #360 .