feat(posts): import & external markdown — S1.1 (#22)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
External .md/.markdown opens and edits as-is in a single guest slot (File > Open... Cmd+O, drag-onto-window): SessionTarget extends EditorSession to write in place verbatim, no cursor sidecar, the #67 conflict alert reused for foreign files. Import... (Shift+Cmd+O) copies multi-select files in as Posts behind ONE Origin ask (writer default, immutable); external frontmatter keys ride verbatim with pass_state/origin set; slug/collision machinery shared with writeNew. Audit fixes folded in: BOM stripped + CRLF normalized at the trust boundary (a CRLF pair is one Swift grapheme — \n splits saw one line); unreadable files refuse to open (loadFailed — a failed read never becomes a write); dropped web links and severed symlinks guarded; ~24 lines of reviewer-flagged dead weight removed. 7 new tests; full unit + UI suite green; swiftlint clean. Map #22 stays open pending the live calibration pass (#88 posture).
This commit is contained in:
1 parent
683d697367
commit
0f1c4ef4fe
14 files changed
+691
-49
No files matched your search
@@ -104,6 +104,8 @@ nonisolated struct Post: Identifiable, Equatable {
|
||||
|
||||
nonisolated extension Substring {
|
||||
func trimmed() -> String {
|
||||
// whitespacesAndNewlines, not .whitespaces: a CRLF file's lines carry
|
||||
// a trailing \r that would defeat every "---" boundary check.
|
||||
trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user