Make GeminiFormat things public

This commit is contained in:
Shadowfacts 2020-07-12 23:25:20 -04:00
parent 95dbb17779
commit bcac15b718
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 7 additions and 7 deletions

View File

@ -7,9 +7,9 @@
import Foundation import Foundation
struct Document { public struct Document {
let url: URL public let url: URL
var lines: [Line] public var lines: [Line]
init(url: URL, lines: [Line] = []) { init(url: URL, lines: [Line] = []) {
self.url = url self.url = url
@ -17,7 +17,7 @@ struct Document {
} }
} }
extension Document { public extension Document {
enum Line: Equatable { enum Line: Equatable {
case text(String) case text(String)
case link(URL, text: String?) case link(URL, text: String?)
@ -28,7 +28,7 @@ extension Document {
} }
} }
extension Document { public extension Document {
enum HeadingLevel: Int { enum HeadingLevel: Int {
case h1 = 1, h2 = 2, h3 = 3 case h1 = 1, h2 = 2, h3 = 3
} }

View File

@ -7,11 +7,11 @@
import Foundation import Foundation
struct GeminiParser { public struct GeminiParser {
private init() {} private init() {}
static func parse(text: String, baseURL: URL) -> Document { public static func parse(text: String, baseURL: URL) -> Document {
var doc = Document(url: baseURL) var doc = Document(url: baseURL)
var preformattingState = PreformattingState.off var preformattingState = PreformattingState.off