Commit: 448912aee73c6c82a3da87337402d9fbed35b05a Parent: 750fd099ba80b548cf374f87dffd7cb62af4c2d2 Author: Vi Grey Date: 2023-08-26 07:02 UTC Summary: Fix double $ for gemtext data in html CHANGELOG.md | 7 +++++++ src/bergelmir.go | 2 +- src/http.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78a8c96..ca5ec18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [0.0.25] - 2023-08-26 + +### Fixed + +- Double `$` in `%GEMINI_CONTENT%` + + ## [0.0.24] - 2023-08-18 ### Added diff --git a/src/bergelmir.go b/src/bergelmir.go index 75755bb..a80c6ad 100644 --- a/src/bergelmir.go +++ b/src/bergelmir.go @@ -13,7 +13,7 @@ var ( ) const ( - VERSION = "0.0.23" + VERSION = "0.0.25" ) func init() { diff --git a/src/http.go b/src/http.go index 8f06311..ea64a24 100644 --- a/src/http.go +++ b/src/http.go @@ -74,7 +74,7 @@ func catchAll(w http.ResponseWriter, r *http.Request) { htmlLayoutContent, err := os.ReadFile(layoutPath) handleErr(err, fmt.Sprintf("Unable to read Layout HTML file %s\n", layoutPath)) htmlLayoutContent = bytes.ReplaceAll(htmlLayoutContent, titleToken, pageTitle) - htmlLayoutContent = bytes.ReplaceAll(htmlLayoutContent, geminiContentToken, bytes.ReplaceAll(content, []byte("$"), []byte("$$"))) + htmlLayoutContent = bytes.ReplaceAll(htmlLayoutContent, geminiContentToken, content) htmlLayoutContent = bytes.ReplaceAll(htmlLayoutContent, pagePathToken, []byte(u)) w.Write(htmlLayoutContent) } else if isRSSFeed(u) { gemini://vigrey.com/git/bergelmir/commit/448912aee73c6c82a3da87337402d9fbed35b05a.txt

-- Leo's gemini proxy

-- Connecting to vigrey.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/plain; charset=UTF-8

-- Response ended

-- Page fetched on Mon May 20 15:23:52 2024