Skip to content

Commit

Permalink
Fix import substitution for docs examples
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Jun 1, 2023
1 parent 8198205 commit 4e6deb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/prepare-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 4e6deb3

Please sign in to comment.