Skip to content

Commit 3f5b94c

Browse files
authored
Fix Gitbook relative links (#1196)
1 parent ef96ad1 commit 3f5b94c

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

pgml-cms/careers/full-stack-engineer.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@ We take care of our team and care about your well being.
3535
### Employment Eligibility
3636

3737
You must be eligible to work in the United States.
38-
39-
\

pgml-cms/careers/machine-learning-engineer.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@ We take care of our team and care about your well being.
3535
### Employment Eligibility
3636

3737
You must be eligible to work in the United States.
38-
39-
\

pgml-cms/careers/product-manager.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ We take care of our team and care about your well being.
3636

3737
You must be eligible to work in the United States.
3838

39-
\

pgml-dashboard/src/components/navigation/tabs/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ pub mod tab;
66
pub use tab::Tab;
77

88
// src/components/navigation/tabs/tabs
9-
#[allow(clippy::module_inception)]
109
pub mod tabs;
1110
pub use tabs::Tabs;

pgml-dashboard/src/utils/markdown.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,20 @@ pub fn mkdocs<'a>(root: &'a AstNode<'a>, arena: &'a Arena<AstNode<'a>>) -> anyho
917917

918918
iter_nodes(root, &mut |node| {
919919
match &mut node.data.borrow_mut().value {
920+
&mut NodeValue::Link(ref mut link) => {
921+
let path = Path::new(link.url.as_str());
922+
923+
if path.is_relative() {
924+
if link.url.ends_with(".md") {
925+
for _ in 0..".md".len() {
926+
link.url.pop();
927+
}
928+
}
929+
}
930+
931+
Ok(true)
932+
}
933+
920934
&mut NodeValue::Text(ref mut text) => {
921935
if text.starts_with("=== \"") {
922936
let mut parent = {

0 commit comments

Comments
 (0)