Content-Length: 1497 | pFad | http://github.com/postgresml/postgresml/pull/1231.diff
thub.com
diff --git a/pgml-dashboard/src/utils/markdown.rs b/pgml-dashboard/src/utils/markdown.rs
index aba253366..c5be4fd49 100644
--- a/pgml-dashboard/src/utils/markdown.rs
+++ b/pgml-dashboard/src/utils/markdown.rs
@@ -917,6 +917,7 @@ pub fn mkdocs<'a>(root: &'a AstNode<'a>, arena: &'a Arena>) -> anyho
iter_nodes(root, &mut |node| {
match &mut node.data.borrow_mut().value {
+ // Strip .md extensions that gitbook includes in page link urls
&mut NodeValue::Link(ref mut link) => {
let path = Path::new(link.url.as_str());
@@ -932,6 +933,21 @@ pub fn mkdocs<'a>(root: &'a AstNode<'a>, arena: &'a Arena>) -> anyho
}
&mut NodeValue::Text(ref mut text) => {
+
+ // Strip .md extensions that gitbook includes in page link text
+ if text.ends_with(".md") {
+ if let Some(parent) = node.parent() {
+ match parent.data.borrow().value {
+ NodeValue::Link(ref link) => {
+ for _ in 0..".md".len() {
+ text.pop();
+ }
+ }
+ _ => {}
+ }
+ }
+ }
+
if text.starts_with("=== \"") {
let mut parent = {
match node.parent() {
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/postgresml/postgresml/pull/1231.diff
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy