fix(import): handle real-world Logseq graphs

- empty bullets no longer panic the outline parser
- weekday names with non-ASCII letters (miércoles) no longer panic the date parser
- journal refs are recognised in the configured title format and in Logseq's
  default one, so graphs whose format changed keep their date links

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-21 15:06:20 +02:00
1 parent 6a4a76670b
commit d536192603
4 files changed
+57 -25

No files matched your search

+8 -1
View File
@@ -222,7 +222,7 @@ fn split_props(mut lines: Vec<String>) -> (String, Properties) {
}
let mut props = Properties::new();
let first_is_prop = lines.first().is_some_and(|l| property_split(l).is_some());
let start = usize::from(!first_is_prop);
let start = usize::from(!first_is_prop).min(lines.len());
let mut end = start;
while end < lines.len() {
match property_split(&lines[end]) {
@@ -330,6 +330,13 @@ pub fn split_aliases(value: &str) -> Vec<String> {
mod tests {
use super::*;
#[test]
fn empty_bullets_do_not_panic() {
for text in ["-", "-\n- a", "- a\n\t-\n", "\n-\n\n"] {
parse_markdown(text);
}
}
#[test]
fn nesting_and_multiline() {
let o = parse_markdown(