Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e213ee

Browse files
authored
handle nav sections, badly (#1212)
1 parent88e0dc2 commit7e213ee

File tree

3 files changed

+121
-4
lines changed

3 files changed

+121
-4
lines changed

‎pgml-dashboard/Cargo.lock

Lines changed: 116 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎pgml-dashboard/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ log = "0.4"
2929
markdown ="1.0.0-alpha.14"
3030
num-traits ="0.2"
3131
once_cell ="1.18"
32-
pgml = {version ="0.9.6",path ="../pgml-sdks/pgml/" }
32+
pgml = {version ="0.10.0",path ="../pgml-sdks/pgml/" }
3333
pgml-components = {path ="../packages/pgml-components" }
3434
pgvector = {version ="0.2.2",features = ["sqlx","postgres" ] }
3535
rand ="0.8"

‎pgml-dashboard/src/api/cms.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,25 @@ impl Collection {
9292
let mdast = markdown::to_mdast(&summary_contents,&::markdown::ParseOptions::default())
9393
.unwrap_or_else(|_|panic!("Could not parse summary: {summary_path:?}"));
9494

95+
letmut index =Vec::new();
9596
for nodein mdast
9697
.children()
9798
.unwrap_or_else(||panic!("Summary has no content: {summary_path:?}"))
9899
.iter()
99100
{
100101
match node{
101102
Node::List(list) =>{
102-
self.index =self.get_sub_links(list).unwrap_or_else(|_|{
103+
letmut links =self.get_sub_links(list).unwrap_or_else(|_|{
103104
panic!("Could not parse list of index links: {summary_path:?}")
104105
});
105-
break;
106+
index.append(&mut links);
106107
}
107108
_ =>{
108109
warn!("Irrelevant content ignored in: {summary_path:?}")
109110
}
110111
}
111112
}
113+
self.index = index;
112114

113115
ifself.index.is_empty(){
114116
error!("Index has no entries for Collection: {}",self.name);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp