swiftgemtext

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

commit 1737a929550fd88267dfbc586891d84738863f00
parent da81d21bc3b1e13fd041c4cf4adfbce6f61a0c3e
Author: FIGBERT <figbert@figbert.com>
Date:   Tue, 20 Apr 2021 10:50:49 -0700

Rename struct from SwiftGemtext to Gemtext

Diffstat:
MSources/SwiftGemtext/SwiftGemtext.swift | 2+-
MTests/SwiftGemtextTests/SwiftGemtextTests.swift | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Sources/SwiftGemtext/SwiftGemtext.swift b/Sources/SwiftGemtext/SwiftGemtext.swift @@ -1,6 +1,6 @@ import SwiftUI -struct SwiftGemtext { +struct Gemtext { let source: String init(_ src: String) { diff --git a/Tests/SwiftGemtextTests/SwiftGemtextTests.swift b/Tests/SwiftGemtextTests/SwiftGemtextTests.swift @@ -4,7 +4,7 @@ import XCTest final class SwiftGemtextTests: XCTestCase { func testSingleLine() { let source = "This is an example line" - let run = SwiftGemtext(source).parse() + let run = Gemtext(source).parse() XCTAssertEqual([LineType.Text(source)], run) } @@ -27,7 +27,7 @@ final class SwiftGemtextTests: XCTestCase { LineType.Link(URL(string: "gemini://figbert.com/")!, "figbert.com (gemini)"), LineType.Link(URL(string: "https://news.ycombinator.com/")!, "Hacker News"), ] - let run = SwiftGemtext(source).parse() + let run = Gemtext(source).parse() XCTAssertEqual(manual, run) } @@ -74,7 +74,7 @@ final class SwiftGemtextTests: XCTestCase { LineType.Link(URL(string: "https://google.com/")!, "Google"), LineType.Link(URL(string: "gemini://figbert.com")!, nil), ] - XCTAssertEqual(manual, SwiftGemtext(source).parse()) + XCTAssertEqual(manual, Gemtext(source).parse()) } static var allTests = [