Skip to content

Commit a048c2f

Browse files
readmd.md update2
1 parent 8b324bc commit a048c2f

File tree

2 files changed

+40
-24
lines changed

2 files changed

+40
-24
lines changed

.github/workflows/sync-wiki.yml

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,34 +89,49 @@ jobs:
8989
# Process HTML img tags separately - preserving all attributes
9090
echo "Processing HTML image references..."
9191
92-
# Use a more robust method to process HTML img tags
93-
# Create a temporary file for processing
92+
# Use a more reliable approach with temporary files and simpler perl commands
9493
temp_file=$(mktemp)
9594
echo "$content" > "$temp_file"
9695
97-
# Process each img tag properly with perl
98-
perl -i -0777 -pe '
99-
while (s/(<img\s+[^>]*?src=")([^"]+)("[^>]*?>)/) {
100-
my $prefix = $1;
101-
my $src = $2;
102-
my $suffix = $3;
103-
104-
# Skip URLs
105-
if ($src =~ /^http/) {
106-
# Do nothing, keep as is
107-
} else {
108-
# Path to be replaced
109-
my $filename = $src;
110-
$filename =~ s/.*\///; # Extract filename
111-
my $new_path = "images/" . $filename;
112-
$_ = $` . $prefix . $new_path . $suffix . $`;
113-
}
114-
}
115-
' "$temp_file"
96+
# Create a simpler perl script file instead of inline perl
97+
perl_script=$(mktemp)
98+
# Write the perl script with proper escaping for YAML
99+
cat > "$perl_script" << 'PERLSCRIPT'
100+
#!/usr/bin/perl
101+
use strict;
102+
use warnings;
103+
104+
my $content = do { local $/; <STDIN> };
105+
106+
# Process HTML img tags
107+
while ($content =~ m|(<img\s+[^>]*?src=")([^"]+)("[^>]*?>)|g) {
108+
my $prefix = $1;
109+
my $src = $2;
110+
my $suffix = $3;
111+
my $tag = $prefix . $src . $suffix;
112+
113+
# Skip URLs
114+
next if $src =~ /^http/;
115+
116+
# Get just the filename
117+
my $filename = $src;
118+
$filename =~ s/.*\///;
119+
my $new_path = "images/" . $filename;
120+
121+
# Replace in content
122+
my $new_tag = $prefix . $new_path . $suffix;
123+
$content =~ s/\Q$tag\E/$new_tag/g;
124+
}
125+
126+
print $content;
127+
PERLSCRIPT
128+
129+
# Process content with the perl script
130+
cat "$temp_file" | perl "$perl_script" > "${temp_file}.new"
131+
content=$(cat "${temp_file}.new")
116132

117-
# Read back the processed content
118-
content=$(cat "$temp_file")
119-
rm "$temp_file" # Clean up
133+
# Clean up temporary files
134+
rm "$temp_file" "${temp_file}.new" "$perl_script"
120135

121136
# Now copy all the images referenced in HTML tags
122137
for img_src in $(grep -o '<img [^>]*src="[^"]*"' "./$rel_path" | sed -E 's/.*src="([^"]*)".*/\1/'); do

benchmarks/rotatingDrum/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This benchmark compares the performance of phasicFlow with a well-stablished com
1313
</div>
1414
</div>
1515

16+
1617
<div align="center">
1718
<img src="./images/phasicFlow_snapshot.png" style="width: 400px;" />
1819
<div align="center">

0 commit comments

Comments
 (0)