Skip to content

Commit

Permalink
Register newline state.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhx committed Apr 28, 2024
1 parent a4b065d commit f2859d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/libgir2swift/emitting/gtk2swiftdoc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,12 @@ public func gtkDoc2SwiftDoc(for thing: GIR.Thing, _ gtkDoc: String, linePrefix:
state = .passThrough
continue
case .link:
guard c == ")" || c.isWhitespace || c.isNewline else { break }
let nl = c.isNewline
guard c == ")" || nl || c.isWhitespace else { break }
wasNewLine = nl
flush()
state = .passThrough
continue
case .quotedLanguagePreamble:
guard !c.isWhitespace else { break }
guard c == "<" && j < e && gtkDoc[j] == "!" else {
Expand Down

0 comments on commit f2859d7

Please sign in to comment.