aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/render/readme.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-06 10:21:33 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-06 10:21:33 +0800
commitfcef969ec4d2763727ad7475b581a72be9240b00 (patch)
tree4a1757e2e0f1c5eb1e8dc625de0ae60913c685e7 /forged/internal/render/readme.go
parentImport argon2id (diff)
downloadforge-fcef969ec4d2763727ad7475b581a72be9240b00.tar.gz
forge-fcef969ec4d2763727ad7475b581a72be9240b00.tar.zst
forge-fcef969ec4d2763727ad7475b581a72be9240b00.zip
Remove org-mode support for now, due to dependency issues
Diffstat (limited to '')
-rw-r--r--forged/internal/render/readme.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/forged/internal/render/readme.go b/forged/internal/render/readme.go
index 195c87f..fa1be7e 100644
--- a/forged/internal/render/readme.go
+++ b/forged/internal/render/readme.go
@@ -10,7 +10,6 @@ import (
"strings"
"github.com/microcosm-cc/bluemonday"
- "github.com/niklasfasching/go-org/org"
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/extension"
"go.lindenii.runxiyu.org/forge/forged/internal/misc"
@@ -29,12 +28,6 @@ func Readme(data []byte, filename string) (string, template.HTML) {
return "Error fetching README", EscapeHTML("Unable to render README: " + err.Error())
}
return "README.md", template.HTML(bluemonday.UGCPolicy().SanitizeBytes(buf.Bytes())) //#nosec G203
- case "readme.org":
- htmlStr, err := org.New().Parse(strings.NewReader(misc.BytesToString(data)), filename).Write(org.NewHTMLWriter())
- if err != nil {
- return "Error fetching README", EscapeHTML("Unable to render README: " + err.Error())
- }
- return "README.org", template.HTML(bluemonday.UGCPolicy().Sanitize(htmlStr)) //#nosec G203
default:
return filename, template.HTML("<pre>" + html.EscapeString(misc.BytesToString(data)) + "</pre>") //#nosec G203
}