ghwikipp: edit: Fixup links in initial preview data, before any editing.

From f1be702aa61abc7763e2bee4fa601ce63801cf60 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Fri, 10 May 2024 02:44:52 +0000
Subject: [PATCH] edit: Fixup links in initial preview data, before any
 editing.

Fixes #54.
---
 index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.php b/index.php
index 5099cc0..6493628 100644
--- a/index.php
+++ b/index.php
@@ -1143,7 +1143,7 @@ function build_index($base, $dname, &$output)
 
     release_git_repo_lock();
 
-    $template_vars['cooked'] = ($cooked === false) ? '' : $cooked;
+    $template_vars['cooked'] = ($cooked === false) ? '' : fixup_preview_links($document, $cooked);
     $template_vars['raw'] = ($raw === false) ? '' : $raw;
     print_template('edit', $template_vars);