Skip to content

Commit

Permalink
fix(re0-gallery): avoid only cosmetic changes (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
CCXXXI authored Sep 10, 2023
1 parent 4230f4f commit 414d740
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/re0_gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ def sync_galleries():
it = iter(zh_templates)
zh_text = re.sub("\0", lambda _: next(it), zh_text)

# cosmetic changes
zh_text = CosmeticChangesToolkit(zh_page).change(zh_text)

# check if text changed
if zh_text == zh_page.text:
logging.debug("no change for %s", zh_page.title())
continue

# cosmetic changes
zh_text = CosmeticChangesToolkit(zh_page).change(zh_text)

zh_page.text = zh_text
zh_page.save(
summary=f"Sync {'tabber' if is_sync_tabber else 'galleries'} with {link}"
Expand Down

0 comments on commit 414d740

Please sign in to comment.