We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent090481f commit0b87292Copy full SHA for 0b87292
pgml-dashboard/src/utils/markdown.rs
@@ -917,6 +917,7 @@ pub fn mkdocs<'a>(root: &'a AstNode<'a>, arena: &'a Arena<AstNode<'a>>) -> anyho
917
918
iter_nodes(root,&mut |node|{
919
match&mut node.data.borrow_mut().value{
920
+// Strip .md extensions that gitbook includes in page link urls
921
&mutNodeValue::Link(refmut link) =>{
922
let path =Path::new(link.url.as_str());
923
@@ -932,6 +933,21 @@ pub fn mkdocs<'a>(root: &'a AstNode<'a>, arena: &'a Arena<AstNode<'a>>) -> anyho
932
933
}
934
935
&mutNodeValue::Text(refmut text) =>{
936
+
937
+// Strip .md extensions that gitbook includes in page link text
938
+if text.ends_with(".md"){
939
+ifletSome(parent) = node.parent(){
940
+match parent.data.borrow().value{
941
+NodeValue::Link(ref link) =>{
942
+for _in0..".md".len(){
943
+ text.pop();
944
+}
945
946
+ _ =>{}
947
948
949
950
951
if text.starts_with("===\""){
952
letmut parent ={
953
match node.parent(){