public static function createEditLinks($gedrec, GedcomRecord $record): string
    {
        return preg_replace(
            "/@([^#@\n]+)@/m",
            '<a href="' . e(route('edit-raw-record', [
                'ged'  => $record->tree()->name(),
                'xref' => $record->xref(),
            ])) . '">@\\1@</a>',
            $gedrec
        );
    }