Commit: b78abfa9018f1bc9ae0caaf2d130f950082d42a8 Parent: aef6fd0d9cde79dfd8b63c3fad7829fbe72a92bf Author: Vi Grey Date: 2023-08-17 00:00 UTC Summary: change #### line behavior CHANGELOG.md | 7 +++++++ src/bergelmir.go | 2 +- src/gemtext.go | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b34ddb..6a30248 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.23] - 2023-08-16 + +### Changed + +- level 4 header is now level 3 header line with text starting with # instead of text line + + ## [0.0.22] - 2023-08-15 ### Added diff --git a/src/bergelmir.go b/src/bergelmir.go index 69d6d37..75755bb 100644 --- a/src/bergelmir.go +++ b/src/bergelmir.go @@ -13,7 +13,7 @@ var ( ) const ( - VERSION = "0.0.22" + VERSION = "0.0.23" ) func init() { diff --git a/src/gemtext.go b/src/gemtext.go index 0f6b6ce..9d75522 100644 --- a/src/gemtext.go +++ b/src/gemtext.go @@ -37,8 +37,9 @@ func parseGemtextLine(line string, preformattedToggle bool) (g gemtextLine) { g.altText = strings.TrimSpace(line[3:]) // Check if invalid heading case strings.HasPrefix(line, "####"): - g.lineType = GEMTEXT_TEXT - g.text = strings.TrimSpace(line) + g.lineType = GEMTEXT_HEADING + g.level = 3 + g.text = line[3:] // Check if heading level 3 (5.5.1 of specification.gmi) case strings.HasPrefix(line, "###"): g.lineType = GEMTEXT_HEADING gemini://vigrey.com/git/bergelmir/commit/b78abfa9018f1bc9ae0caaf2d130f950082d42a8.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 16:50:33 2024