swiftgemtext

[ACTIVE] gemtext parsing in swift
git clone git://git.figbert.com/swiftgemtext.git
Log | Files | Refs | README

commit 375ac98d54c498ad8f73210931b4993b08bf7374
parent 64056171c6970ee83c06cd09510647c79ea55694
Author: FIGBERT <figbert@figbert.com>
Date:   Tue, 20 Apr 2021 12:08:19 -0700

Fix quote parsing to be compliant with spec

Diffstat:
MSources/SwiftGemtext/SwiftGemtext.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Sources/SwiftGemtext/SwiftGemtext.swift b/Sources/SwiftGemtext/SwiftGemtext.swift @@ -63,7 +63,7 @@ struct Gemtext { } else if line.starts(with: "* ") { // Unordered List Line return LineType.UnorderedList(line.dropFirst(2).trimmingCharacters(in: .whitespacesAndNewlines)) } else if line.starts(with: ">") { // Quote Line - return LineType.Quote(String(line.dropFirst(2))) + return LineType.Quote(line.dropFirst().trimmingCharacters(in: .whitespacesAndNewlines)) } else if line.trimmingCharacters(in: .whitespacesAndNewlines) == "" { // Empty Line return LineType.EmptyLine } else { // Text Line