Skip to content

Commit

Permalink
support multiple dts that share the same dd
Browse files Browse the repository at this point in the history
  • Loading branch information
oatkiller committed Oct 22, 2020
1 parent b0c1f22 commit 7522b68
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ export class Simulator {
const subjectNode = subject.getDOMNode();
let current = subjectNode.nextElementSibling;
const associated: Set<Element> = new Set();
// Multiple `dt`s can be associated with a set of `dd`s. Skip immediately following `dt`s.
while (current !== null && current.nodeName === 'DT') {
current = current.nextElementSibling;
}
while (current !== null && current.nodeName === 'DD') {
associated.add(current);
current = current.nextElementSibling;
Expand Down

0 comments on commit 7522b68

Please sign in to comment.