mirror of
https://github.com/EbookFoundation/free-programming-books.git
synced 2026-07-08 05:11:57 +00:00
Merge 9f772c3b58407d4a66a2fe73a5417105d09b414d into a6afe576b653cb505c330cd960f4e858051aee51
This commit is contained in:
commit
f30cd02b26
@ -273,6 +273,10 @@ def lint_file(path, cfg):
|
||||
# Extract the text content of the list item and remove leading/trailing whitespace
|
||||
text = list_item.group(1).strip()
|
||||
|
||||
|
||||
# Always define is_link_only_item to avoid UnboundLocalError later
|
||||
is_link_only_item = False
|
||||
|
||||
# Extract item parts (title, author, metadata) if it matches the book format
|
||||
book_item = BOOK_ITEM_RE.match(text)
|
||||
|
||||
@ -293,9 +297,6 @@ def lint_file(path, cfg):
|
||||
# Initialize title, author, and meta with empty strings
|
||||
title, author, meta = text, '', ''
|
||||
|
||||
# Set is_link_only_item to False
|
||||
is_link_only_item = False
|
||||
|
||||
# Specific check: RTL author followed by LTR metadata (e.g., اسم المؤلف (PDF))
|
||||
if active_block_direction_ctx == 'rtl' and \
|
||||
author and meta and \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user