We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7cc4bd commit 1467f6bCopy full SHA for 1467f6b
1 file changed
script/autoHeader.sh
@@ -30,8 +30,8 @@ find $DOC_DIR -name "*.md" | while read pathfile; do
30
31
# If a title was find, add it in the header
32
if [ ! -z "$title" ];then
33
- # Remove the "#" from the title
34
- title=$(echo "$title" | sed 's/\#//g')
+ # Remove the "#" from the title and extra spaces around it
+ title=$(echo "$title" | sed -r 's/\ ?+\#\ +//g' )
35
36
# Remove the title from the file content
37
sed -i '/^\#\ /d' "$pathfile"
@@ -41,7 +41,7 @@ find $DOC_DIR -name "*.md" | while read pathfile; do
41
sed -i '1s/^/---\n\n/' "$pathfile";
42
43
# Writing title
44
- sed -i "1s/^/title: $title\n/" "$pathfile";
+ sed -i "1s/^/title: \"$title\"\n/" "$pathfile";
45
46
# The id is (by default) egal to the filename
47
# -> We want it
0 commit comments