docs
docs copied to clipboard
fix: optimize find command for better performance
I noticed that the find command in the script was using -exec twice, which can be optimized. I replaced it with a single -exec using + to improve performance. Additionally, I cleaned up the backup file removal by using a separate find command.
Here's the updated code:
find "$TYPEDOC_OUTPUT_DIR" -type f -name "*.md" -exec \
sed -i.bak -E 's/\\+//g' {} + && find "$TYPEDOC_OUTPUT_DIR" -type f -name "*.md.bak" -delete
This change should make the script more efficient while maintaining the same functionality.