File: 020250227~27c1c79.patch

package info (click to toggle)
rust-microformats 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,068 kB
  • sloc: javascript: 71; makefile: 26; sh: 1
file content (70 lines) | stat: -rw-r--r-- 2,390 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Description: fix reference fetching of object
Author: Jacky Alciné <ayo@jacky.wtf>
Origin: upstream, https://gitlab.com/maxburon/microformats-parser/-/merge_requests/11/diffs?commit_id=27c1c79
Bug: https://gitlab.com/maxburon/microformats-parser/-/issues/25
Last-Update: 2025-04-07
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/library/src/jf2.rs
+++ b/library/src/jf2.rs
@@ -324,7 +324,7 @@
         let mut references = if let Some(Property::References(refs)) = self.0.remove("references") {
             refs
         } else {
-            return;
+            Default::default()
         };
 
         for (property_name, property_value) in self.0.iter_mut() {
--- a/library/src/jf2/test.rs
+++ b/library/src/jf2/test.rs
@@ -63,7 +63,6 @@
             }
             ],
             "properties": {
-                "url": ["https://indieweb.org/pages"],
                 "bookmark-of": [
                     {
                         "type": ["h-cite"],
@@ -78,7 +77,8 @@
                         "html": "<strong>HTML</strong>!",
                         "value": "HTML!"
                     }
-                ]
+                ],
+                "url": ["https://indieweb.org/pages"],
             }
         }
         ]
@@ -90,24 +90,24 @@
         "@context": super::JSON_LD_CONTEXT_URI,
         "children": [
         {
-            "text": "HTML!",
-            "html": "<strong>HTML</strong>!",
-            "type": "entry",
-            "url": "https://indieweb.org/pages",
             "bookmark-of": "https://indieweb.org/bookmark",
             "children": [
                 {
+                    "photo": "https://indieweb.org/child-photo.jpg",
                     "type": "cite",
                     "url": "https://indieweb.org/child",
-                    "photo": "https://indieweb.org/child-photo.jpg",
                 }
-            ]
+            ],
+            "html": "<strong>HTML</strong>!",
+            "text": "HTML!",
+            "type": "entry",
+            "url": "https://indieweb.org/pages",
         }
         ],
         "references": {
             "https://indieweb.org/bookmark": {
-                "type": "cite",
                 "photo": "https://indieweb.org/bookmark-photo.jpg",
+                "type": "cite",
                 "url": "https://indieweb.org/bookmark",
             }
         },