Skip to content

Fix signifiers getting wrapped twice - #4

Open
davidstosik wants to merge 1 commit into
frankolson:masterfrom
davidstosik:sto/fix-double-signifier
Open

davidstosik wants to merge 1 commit into
frankolson:masterfrom
davidstosik:sto/fix-double-signifier

Conversation

@davidstosik

Copy link
Copy Markdown

See #3 for details.

Basically, the .task-list-item selector will select HTML elements that were already selected by ul > li.
Combining them both into renderedBullets duplicated checkbox items.

In my changes, I query the DOM only once for all ul > li items, then use filtering to find inside these items the ones that are actually checkboxes.

See frankolson#3 for details.

Basically, the `.task-list-item` selector will select HTML elements that were already selected by `ul > li`.
Combining them both into `renderedBullets` duplicated checkbox items.

In my changes, I query the DOM only once for all `ul > li` items, then use filtering to find inside these items the ones that are actually checkboxes.
@SmileyChris

Copy link
Copy Markdown

Thanks @davidstosik — your diagnosis of the selector overlap was spot-on. I've just been through #3 in depth and my fork's v1.3.1 takes a slightly wider approach: same selector fix, plus the innerHTML.replace mid-text bug you mentioned, plus a pure wrapSignifiers helper with unit tests. I'll open a PR here shortly that supersedes this one — happy to close in favour of whichever the maintainer prefers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants