Skip to content

Commit

Permalink
Replace \\[ \\] by $$ $$
Browse files Browse the repository at this point in the history
  • Loading branch information
victorliu5296 committed Sep 10, 2024
1 parent ca03819 commit 2bc8c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions replace-delimiters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ replace_delimiters() {
perl -i -pe '
# Replace \( expression \) with $expression$ while preserving spaces
s/\\\(([^\)]*)\\\)/\$$1\$/g;
# Replace \[ expression \] with \\[ expression \\] while preserving spaces
s/\\\[([^\]]*)\\\]/\\\[$1\\\]/g;
# Replace \[ expression \] with $$ expression $$ while preserving spaces
s/\\\[([^\]]*)\\\]/\$\$\[$1\\$\$/g;
# Replace \{ with \\{ and \} with \\}
s/\\\{/\\\\\{/g;
s/\\\}/\\\\\}/g;
Expand Down

0 comments on commit 2bc8c67

Please sign in to comment.