From 4fb9ffd84e5fb63be098c51f651627efd059246f Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Sat, 17 Jul 2021 09:05:34 -0500 Subject: [PATCH] fix brokenlinks.sh and some broken lings (#155) --- DevOps.md | 2 +- Draft-of-new-Documentation-Workflow.md | 2 +- Home.md | 2 +- _Sidebar.md | 2 +- wiki-tools/brokenlinks.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DevOps.md b/DevOps.md index d9629b3e..729f3a02 100644 --- a/DevOps.md +++ b/DevOps.md @@ -1 +1 @@ -See [Build Server](Build-Server) +See [Build Server](Build-Server-and-Automation) diff --git a/Draft-of-new-Documentation-Workflow.md b/Draft-of-new-Documentation-Workflow.md index bdd024f0..489dfa3d 100644 --- a/Draft-of-new-Documentation-Workflow.md +++ b/Draft-of-new-Documentation-Workflow.md @@ -32,7 +32,7 @@ Example: Links to images are relative to the .md file they are in. Example: -`![TunerStudio New Project View](images/TunerStudio_new_project.png)` +`![TunerStudio New Project View](FAQ/images/TunerStudio_new_project.png)` **Q:** What sort of fancy options do we have? **A:** We can do collapsible sections & hints sections! See [cranking](Cranking) for an example. diff --git a/Home.md b/Home.md index 0135847a..6819b5e7 100644 --- a/Home.md +++ b/Home.md @@ -66,7 +66,7 @@ So you are thinking of doing an engine control project. You have stopped by the ## rusEFI in action! -[Engines running rusEFI](List-of-engines-running-rusEFI) +[Engines running rusEFI](List-of-Engines-Running-rusEFI) ### [![Miata rusEFI Racecar!](https://user-images.githubusercontent.com/5051341/80621997-bf7bf000-8a0d-11ea-998e-48fc3accba59.png)](https://www.youtube.com/embed/3xz66oR95F8?start=8 "Miata rusEFI Racecar!") diff --git a/_Sidebar.md b/_Sidebar.md index 31833956..50072bc5 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -15,7 +15,7 @@ - [Forum](https://rusefi.com/forum/) - [Slack](HOWTO-join-slack-channel) - [Facebook Users Group](https://www.facebook.com/groups/rusEfi/) -- [Engines running on rusEFI](List-of-engines-running-rusEFI) +- [Engines running on rusEFI](List-of-Engines-Running-rusEFI) - [HOWTO-help-rusEFI](HOWTO-help-rusEFI) # Setup Guides diff --git a/wiki-tools/brokenlinks.sh b/wiki-tools/brokenlinks.sh index 08f500d5..c68312f4 100644 --- a/wiki-tools/brokenlinks.sh +++ b/wiki-tools/brokenlinks.sh @@ -98,7 +98,7 @@ searchfile() { # Parentheses are placed around both the old link and new one in order to ensure we replace the link, # and not some other place in the file that happens to use the same words. REPLACE=$(escape '('$link')') - REPLACEWITH=$(escapeReplace "$FILE") + REPLACEWITH=$(escapeReplace "$(basename "$FILE" .md)") sed -i "s/$REPLACE/\($REPLACEWITH\)/" "$1" continue fi @@ -133,7 +133,7 @@ searchfile() { sed -i "s/$REPLACE/\($REPLACEWITH\)/" "$1" # This regex finds links in the file that is passed to searchfile # Results are fed to file descriptor 3 for the reasons previously explained. - done 3< <(grep -oP '(?<=\]\().+?(?=[\)])' "$1") + done 3< <(grep -oP '(?<=\]\().*?(?=[\)])' "$1" | sed -e "s/^$//g" | cut -d '"' -f1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') } export -f searchfile