From 0f13dfba7be8bb90b30a0464809df2ed4b85c8f4 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 15 Jun 2017 18:52:06 -0400 Subject: [PATCH] Omit unnecessary elements in the dev edition Omits the small TOC, fingerprint markers, and
 blocks.

Part of #27.
---
 src/wattsi.pas | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/wattsi.pas b/src/wattsi.pas
index bef0bc8..a512152 100644
--- a/src/wattsi.pas
+++ b/src/wattsi.pas
@@ -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
@@ -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
@@ -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.',