diff --git a/Elwig/Documents/Document.cshtml.cs b/Elwig/Documents/Document.cshtml.cs
index ced43a6..e51627f 100644
--- a/Elwig/Documents/Document.cshtml.cs
+++ b/Elwig/Documents/Document.cshtml.cs
@@ -2,11 +2,15 @@ using System;
using System.Threading.Tasks;
using System.IO;
using Elwig.Helpers;
+using System.Collections.Generic;
+using System.Text.RegularExpressions;
+using System.Linq;
namespace Elwig.Documents {
- public abstract class Document : IDisposable {
+ public abstract partial class Document : IDisposable {
- private TempFile? PdfFile = null;
+ private TempFile? _pdfFile = null;
+ private string? _renderedHtml = null;
public bool ShowFoldMarks = App.Config.Debug;
@@ -35,17 +39,56 @@ namespace Elwig.Documents {
Date = DateTime.Today;
}
+ [GeneratedRegex(@"