Skip to content

Commit

Permalink
Autoformat and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jponttuset committed Mar 10, 2024
1 parent 4a88e2a commit 5ffa6a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ patterns.
## Usage:

```
usage: arxiv_latex_cleaner@v1.0.4 [-h] [--resize_images] [--im_size IM_SIZE]
usage: arxiv_latex_cleaner@v1.0.5 [-h] [--resize_images] [--im_size IM_SIZE]
[--compress_pdf]
[--pdf_im_resolution PDF_IM_RESOLUTION]
[--images_allowlist IMAGES_ALLOWLIST]
Expand Down
2 changes: 1 addition & 1 deletion arxiv_latex_cleaner/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "v1.0.4"
__version__ = "v1.0.5"
7 changes: 3 additions & 4 deletions arxiv_latex_cleaner/arxiv_latex_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
import copy
import logging
import os
from pathlib import Path
import pathlib
import shutil
import subprocess
import tempfile
from tempfile import tempdir

from PIL import Image
import regex
Expand Down Expand Up @@ -179,7 +178,7 @@ def _remove_environment(text, environment):


def _remove_iffalse_block(text):
"""Removes possibly nested r'\iffalse*\fi' blocks from 'text'."""
r"""Removes possibly nested '\iffalse*\fi' blocks from 'text'."""
p = regex.compile(r'\\if\s*(\w+)|\\fi(?!\w)')
level = -1
positions_to_delete = []
Expand Down Expand Up @@ -440,7 +439,7 @@ def _search_reference(filename, contents, strict=False):
# \{[\s%]*path/to/img\.ext[\s%]*\}
filename_regex = filename.replace('.', r'\.')
else:
filename_path = Path(filename)
filename_path = pathlib.Path(filename)

# make extension optional
root, extension = filename_path.stem, filename_path.suffix
Expand Down

0 comments on commit 5ffa6a6

Please sign in to comment.