@@ -24,7 +24,7 @@ find "$BASE_DIR" -type f -name "*.md" | while read file; do
2424 # === Fix all .md links to match Jekyll's pretty permalinks ===
2525 sed " ${SED_INPLACE[@]} " -E ' s|\[([^]]+)\]\(([^)]+)\.md(#[^)]+)?\)|\[\1\]\(/forms-engine-plugin/\2\3\)|g' " $file "
2626 sed " ${SED_INPLACE[@]} " -E ' s|\[([^]]+)\]\(([^)]+)\.md\)|\[\1\]\(/forms-engine-plugin/\2\)|g' " $file "
27-
27+
2828 # === Specific handling for schema files ===
2929 if [[ " $file " == * " /schemas/" * ]]; then
3030 if grep -q " ^---" " $file " && ! grep -q " parent:" " $file " && [[ " $file " != * " /schemas/index.md" ]]; then
@@ -36,7 +36,7 @@ parent: SCHEMA REFERENCE' "$file"
3636 if grep -q " parent: Schema Reference" " $file " ; then
3737 sed " ${SED_INPLACE[@]} " ' s/parent: Schema Reference/parent: SCHEMA REFERENCE/g' " $file "
3838 fi
39-
39+
4040 # Fix common schema reference patterns
4141 sed " ${SED_INPLACE[@]} " -E ' s/\[([^\]]+)\]\(([a-zA-Z0-9_-]+-schema[a-zA-Z0-9_-]*)(\.md)?\)/[\1](\2)/g' " $file "
4242 sed " ${SED_INPLACE[@]} " -E ' s/\[([^\]]+)\]\(([a-zA-Z0-9_-]+-schema-[a-zA-Z0-9_-]*)(\.md)?\)/[\1](\2)/g' " $file "
@@ -98,11 +98,11 @@ echo "🔧 Special handling for files with code examples..."
9898for special_file in " ./features/configuration-based/PAGE_TEMPLATES.md" " ./CONTRIBUTING.md" ; do
9999 if [ -f " $special_file " ]; then
100100 echo " Processing special file: $special_file "
101-
101+
102102 # Create a temporary file
103103 temp_file=" ${special_file} .tmp"
104104 > " $temp_file " # Create empty temporary file
105-
105+
106106 # Process the file line-by-line, tracking if we're in a code block
107107 in_code_block=false
108108 while IFS= read -r line; do
@@ -124,7 +124,7 @@ for special_file in "./features/configuration-based/PAGE_TEMPLATES.md" "./CONTRI
124124 echo " $fixed_line " >> " $temp_file "
125125 fi
126126 done < " $special_file "
127-
127+
128128 # Replace original with fixed version
129129 mv " $temp_file " " $special_file "
130130 fi
@@ -172,14 +172,14 @@ done
172172if [ -f " ./schemas/README.md" ] && [ ! -f " ./schemas/index.md" ]; then
173173 echo " 📝 Creating schemas/index.md from README.md..."
174174 cp " ./schemas/README.md" " ./schemas/index.md"
175-
175+
176176 sed " ${SED_INPLACE[@]} " ' /^---/,/^---/d' " ./schemas/index.md"
177177
178178 # Add new front matter
179179 front_matter=" ---\nlayout: default\ntitle: SCHEMA REFERENCE\nnav_order: 5\nhas_children: true\npermalink: /schemas/\n---\n\n"
180180 sed " ${SED_INPLACE[@]} " " 1s/^/$front_matter /" " ./schemas/index.md"
181-
181+
182182 echo " ✅ Created schemas/index.md with proper front matter"
183183fi
184184
185- echo " ✅ All schema links fixed and documentation prepared!"
185+ echo " ✅ All schema links fixed and documentation prepared!"
0 commit comments