This commit is contained in:
parent
7104a33a4b
commit
c126f9a8a3
|
@ -47,7 +47,7 @@ jobs:
|
||||||
|
|
||||||
# Process image references line by line for more reliable detection
|
# Process image references line by line for more reliable detection
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
# Fix the regex syntax for bash
|
# Check for Markdown style image references
|
||||||
if [[ "$line" =~ !\[(.*)\]\((.*)\) ]]; then
|
if [[ "$line" =~ !\[(.*)\]\((.*)\) ]]; then
|
||||||
img_path="${BASH_REMATCH[2]}"
|
img_path="${BASH_REMATCH[2]}"
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ jobs:
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine the absolute path of the image
|
# Handle Markdown image syntax
|
||||||
if [[ $img_path == /* ]]; then
|
if [[ $img_path == /* ]]; then
|
||||||
# Absolute path within repository
|
# Absolute path within repository
|
||||||
abs_img_path="./$img_path"
|
abs_img_path="./$img_path"
|
||||||
|
@ -87,6 +87,46 @@ jobs:
|
||||||
echo "Files in $base_dir:"
|
echo "Files in $base_dir:"
|
||||||
ls -la "$base_dir"
|
ls -la "$base_dir"
|
||||||
fi
|
fi
|
||||||
|
# Check for HTML style image tags - look for <img tags and extract src attribute
|
||||||
|
elif [[ "$line" =~ \<img[[:space:]][^>]*src=\"([^\"]+)\"[^>]*\> ]]; then
|
||||||
|
img_path="${BASH_REMATCH[1]}"
|
||||||
|
|
||||||
|
# Skip URLs
|
||||||
|
if [[ $img_path == http* ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Determine the absolute path of the image
|
||||||
|
if [[ $img_path == /* ]]; then
|
||||||
|
# Absolute path within repository
|
||||||
|
abs_img_path="./$img_path"
|
||||||
|
else
|
||||||
|
# Relative path to the README
|
||||||
|
abs_img_path="$base_dir/$img_path"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract just the filename
|
||||||
|
img_filename=$(basename "$img_path")
|
||||||
|
wiki_img_path="images/$img_filename"
|
||||||
|
|
||||||
|
# Copy the image to wiki repository if it exists
|
||||||
|
if [ -f "$abs_img_path" ]; then
|
||||||
|
echo "Copying image: $abs_img_path -> ./wiki/$wiki_img_path"
|
||||||
|
cp -v "$abs_img_path" "./wiki/$wiki_img_path" || echo "Error copying image"
|
||||||
|
|
||||||
|
# Escape special characters in the path for sed
|
||||||
|
escaped_img_path=$(echo "$img_path" | sed 's/[\/&]/\\&/g')
|
||||||
|
|
||||||
|
# Replace the HTML image reference in content
|
||||||
|
content=$(echo "$content" | sed "s|src=\"$escaped_img_path\"|src=\"$wiki_img_path\"|g")
|
||||||
|
echo "Replaced HTML image reference: $img_path → $wiki_img_path"
|
||||||
|
else
|
||||||
|
echo "Warning: HTML image file not found: $abs_img_path"
|
||||||
|
# Add more debug info
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
echo "Files in $base_dir:"
|
||||||
|
ls -la "$base_dir"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done < "./$rel_path"
|
done < "./$rel_path"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ This benchmark compares the performance of phasicFlow with a well-stablished com
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
..
|
.
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="./images/phasicFlow_snapshot.png" style="width: 400px;" />
|
<img src="./images/phasicFlow_snapshot.png" style="width: 400px;" />
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
Loading…
Reference in New Issue