Skip to content

Commit

Permalink
Omit unnecessary elements in the dev edition
Browse files Browse the repository at this point in the history
Omits the small TOC, fingerprint markers, and <pre class=idl> blocks.

Part of #27.
  • Loading branch information
domenic committed Jun 15, 2017
1 parent fc38205 commit 0f13dfb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/wattsi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,11 @@ TCrossReferences = record
SaveCrossReference(Element);
end
else
if (Element.IsIdentity(nsHTML, ePre) and (Element.GetAttribute('class').AsString = 'idl') and (Variant = vDEV)) then
begin
Result := False;
end
else
if (Element.IsIdentity(nsHTML, eSpan)) then
begin
if (Element.HasAttribute(kLTAttribute)) then
Expand Down Expand Up @@ -936,7 +941,7 @@ TCrossReferences = record
end;
end
else
if (Instruction = 'smalltoc') then
if ((Instruction = 'smalltoc') and (Variant <> vDEV)) then
begin
if (LastHeadingRank <> 2) then
begin
Expand All @@ -963,7 +968,7 @@ TCrossReferences = record
Result := ProcessNode(Node);
end
else
if (Instruction = 'INSERT FINGERPRINT') then
if ((Instruction = 'INSERT FINGERPRINT') and (Variant <> vDEV)) then
begin
TempElement := E(eSpan, [kCrossRefAttribute, 'fingerprinting vector',
'title', 'There is a potential fingerprinting vector here.',
Expand Down

0 comments on commit 0f13dfb

Please sign in to comment.