Make GeminiFormat things public
This commit is contained in:
parent
95dbb17779
commit
bcac15b718
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue