Browse Source

Fix automatic tagging Text elements

Marcin Ziąbek 1 month ago
parent
commit
35a97118b0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/QuestPDF/Drawing/DocumentGenerator.cs

+ 2 - 2
Source/QuestPDF/Drawing/DocumentGenerator.cs

@@ -229,8 +229,8 @@ namespace QuestPDF.Drawing
             
             if (semanticTreeManager != null)
             {
-                content.InjectSemanticTreeManager(semanticTreeManager);
                 content.ApplySemanticParagraphs();
+                content.InjectSemanticTreeManager(semanticTreeManager);
             }
             
             return content;
@@ -577,7 +577,7 @@ namespace QuestPDF.Drawing
                     if (isTextSemanticTag)
                         textContextLevel--;
                 }
-                else if (element is ArtifactTag artifactTag)
+                else if (element is ArtifactTag)
                 {
                     // ignore all Text elements that are marked as artifacts
                 }