Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package markdown-oxide for openSUSE:Factory checked in at 2025-04-07 17:36:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/markdown-oxide (Old) and /work/SRC/openSUSE:Factory/.markdown-oxide.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "markdown-oxide" Mon Apr 7 17:36:28 2025 rev:6 rq:1267231 version:0.25.1 Changes: -------- --- /work/SRC/openSUSE:Factory/markdown-oxide/markdown-oxide.changes 2024-12-11 21:08:44.900018336 +0100 +++ /work/SRC/openSUSE:Factory/.markdown-oxide.new.1907/markdown-oxide.changes 2025-04-07 17:36:54.717563566 +0200 @@ -1,0 +2,6 @@ +Sat Apr 5 02:06:28 UTC 2025 - Joshua Smith <smolsh...@opensuse.org> + +- Update to version 0.25.1: + * fixed multiple footnote link bug + +------------------------------------------------------------------- Old: ---- markdown-oxide-0.25.0.tar.gz New: ---- markdown-oxide-0.25.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ markdown-oxide.spec ++++++ --- /var/tmp/diff_new_pack.PUGr49/_old 2025-04-07 17:36:55.757607074 +0200 +++ /var/tmp/diff_new_pack.PUGr49/_new 2025-04-07 17:36:55.761607242 +0200 @@ -1,7 +1,7 @@ # # spec file for package markdown-oxide # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: markdown-oxide -Version: 0.25.0 +Version: 0.25.1 Release: 0 Summary: A markdown language server with Obsidian syntax support License: Apache-2.0 ++++++ markdown-oxide-0.25.0.tar.gz -> markdown-oxide-0.25.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown-oxide-0.25.0/LICENSE new/markdown-oxide-0.25.1/LICENSE --- old/markdown-oxide-0.25.0/LICENSE 2024-12-08 22:20:43.000000000 +0100 +++ new/markdown-oxide-0.25.1/LICENSE 2025-02-11 09:05:40.000000000 +0100 @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2024 Felix Zeller Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown-oxide-0.25.0/src/vault/mod.rs new/markdown-oxide-0.25.1/src/vault/mod.rs --- old/markdown-oxide-0.25.0/src/vault/mod.rs 2024-12-08 22:20:43.000000000 +0100 +++ new/markdown-oxide-0.25.1/src/vault/mod.rs 2025-02-11 09:05:40.000000000 +0100 @@ -765,10 +765,13 @@ }) }); - static FOOTNOTE_LINK_RE: Lazy<Regex> = - Lazy::new(|| Regex::new(r"[^\[](?<full>\[(?<index>\^[^\[\] ]+)\])[^\:]").unwrap()); + static FOOTNOTE_LINK_RE: Lazy<Regex> = Lazy::new(|| {Regex::new(r"(?<start>\[?)(?<full>\[(?<index>\^[^\[\] ]+)\])(?<end>:?)").unwrap()}); let footnote_references = FOOTNOTE_LINK_RE .captures_iter(text) + .filter(|capture| matches!( + (capture.name("start"), capture.name("end")), + (Some(start), Some(end)) if !start.as_str().starts_with('[') && !end.as_str().ends_with(':')) + ) .flat_map( |capture| match (capture.name("full"), capture.name("index")) { (Some(full), Some(index)) => Some((full, index)), @@ -1968,6 +1971,65 @@ assert_eq!(parsed, expected) } + + #[test] + fn multi_footnote_link_parsing() { + let text = "This is a footnote[^1][^2][^3] + +[^1]: This is not +[^2]: This is not +[^3]: This is not"; + let parsed = Reference::new(text, "test.md").collect_vec(); + let expected = vec![ + Footnote(ReferenceData { + reference_text: "^1".into(), + range: tower_lsp::lsp_types::Range { + start: tower_lsp::lsp_types::Position { + line: 0, + character: 18, + }, + end: tower_lsp::lsp_types::Position { + line: 0, + character: 22, + }, + } + .into(), + ..ReferenceData::default() + }), + Footnote(ReferenceData { + reference_text: "^2".into(), + range: tower_lsp::lsp_types::Range { + start: tower_lsp::lsp_types::Position { + line: 0, + character: 22, + }, + end: tower_lsp::lsp_types::Position { + line: 0, + character: 26, + }, + } + .into(), + ..ReferenceData::default() + }), + Footnote(ReferenceData { + reference_text: "^3".into(), + range: tower_lsp::lsp_types::Range { + start: tower_lsp::lsp_types::Position { + line: 0, + character: 26, + }, + end: tower_lsp::lsp_types::Position { + line: 0, + character: 30, + }, + } + .into(), + ..ReferenceData::default() + }), + ]; + + assert_eq!(parsed, expected) + } #[test] fn link_parsing_with_png() { ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/markdown-oxide/vendor.tar.zst /work/SRC/openSUSE:Factory/.markdown-oxide.new.1907/vendor.tar.zst differ: char 2760272, line 11316