From 4e6deb3c56c8b054396836f52bff9c67fde766e7 Mon Sep 17 00:00:00 2001 From: Francisco Giordano Date: Thu, 1 Jun 2023 17:48:33 -0300 Subject: [PATCH] Fix import substitution for docs examples --- scripts/prepare-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare-docs.sh b/scripts/prepare-docs.sh index 61772a5a659..d1317b09287 100755 --- a/scripts/prepare-docs.sh +++ b/scripts/prepare-docs.sh @@ -20,7 +20,7 @@ examples_target_dir="docs/modules/api/examples" for f in "$examples_source_dir"/**/*.sol; do name="${f/#"$examples_source_dir/"/}" mkdir -p "$examples_target_dir/$(dirname "$name")" - sed -e '/^import/s|\.\./\.\./|@openzeppelin/contracts/|' "$f" > "$examples_target_dir/$name" + sed -Ee '/^import/s|"(\.\./)+|"@openzeppelin/contracts/|' "$f" > "$examples_target_dir/$name" done node scripts/gen-nav.js "$OUTDIR" > "$OUTDIR/../nav.adoc"