Skip to content

Commit

Permalink
Avoid adding <a class=self-link> to TOCs
Browse files Browse the repository at this point in the history
1572d7e ended up adding links to the
TOCs of index.html and multipage/index.html though not individual
multi-page TOCs such as multipage/microdata.html. This avoids that.

A simpler fix would be to add

TElement(NewLink).RemoveChild(NewLink.lastChild);

after the while statement, but that seems less clean.
  • Loading branch information
annevk authored and sideshowbarker committed Nov 25, 2016
1 parent 5fb70d5 commit 6603383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wattsi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ TCrossReferences = record
NewLink.AppendChild(CandidateChild);
CandidateChild := TempElement.FirstChild;
InSkippedNode := False;
while (Assigned(CandidateChild)) do
while (Assigned(CandidateChild) and ((not (CandidateChild is TElement)) or (TElement(CandidateChild).GetAttribute('class').AsString <> 'self-link'))) do
begin
if ((CandidateChild is TElement) and ((TElement(CandidateChild).IsIdentity(nsHTML, eDFN)) or (TElement(CandidateChild).IsIdentity(nsHTML, eSpan)))) then
begin
Expand Down

0 comments on commit 6603383

Please sign in to comment.