rolfedh-doc-utils 0.1.27__tar.gz → 0.1.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rolfedh_doc_utils-0.1.27/rolfedh_doc_utils.egg-info → rolfedh_doc_utils-0.1.28}/PKG-INFO +1 -1
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/callout_lib/converter_bullets.py +2 -2
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/callout_lib/converter_deflist.py +2 -2
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/callout_lib/detector.py +16 -7
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/callout_lib/table_parser.py +11 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/pyproject.toml +1 -1
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28/rolfedh_doc_utils.egg-info}/PKG-INFO +1 -1
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/LICENSE +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/README.md +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/archive_unused_files.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/archive_unused_images.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/callout_lib/__init__.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/callout_lib/converter_comments.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/check_scannability.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/convert_callouts_interactive.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/convert_callouts_to_deflist.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/__init__.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/extract_link_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/file_utils.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/format_asciidoc_spacing.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/replace_link_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/scannability.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/spinner.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/topic_map_parser.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/unused_adoc.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/unused_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/unused_images.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/validate_links.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/version.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils/version_check.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/doc_utils_cli.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/extract_link_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/find_unused_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/format_asciidoc_spacing.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/replace_link_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/SOURCES.txt +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/dependency_links.txt +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/entry_points.txt +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/requires.txt +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/top_level.txt +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/setup.cfg +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/setup.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_archive_unused_files.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_archive_unused_images.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_auto_discovery.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_check_scannability.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_cli_entry_points.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_extract_link_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_file_utils.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_fixture_archive_unused_files.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_fixture_archive_unused_images.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_fixture_check_scannability.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_parse_exclude_list.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_replace_link_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_symlink_handling.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_table_callout_conversion.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_table_parser.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_topic_map_parser.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_unused_attributes.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_validate_links.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_version_check.py +0 -0
- {rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/validate_links.py +0 -0
|
@@ -59,8 +59,8 @@ class BulletListConverter:
|
|
|
59
59
|
user_value = f'{user_value}>'
|
|
60
60
|
term = f'`{user_value}`'
|
|
61
61
|
else:
|
|
62
|
-
# This is a code line -
|
|
63
|
-
term = f'`{code_line}`'
|
|
62
|
+
# This is a code line - strip whitespace before wrapping in backticks
|
|
63
|
+
term = f'`{code_line.strip()}`'
|
|
64
64
|
|
|
65
65
|
# Collect all explanations for this group
|
|
66
66
|
all_explanation_lines = []
|
|
@@ -54,8 +54,8 @@ class DefListConverter:
|
|
|
54
54
|
user_value = f'{user_value}>'
|
|
55
55
|
term = f'`{user_value}`'
|
|
56
56
|
else:
|
|
57
|
-
# This is a code line -
|
|
58
|
-
term = f'`{code_line}`'
|
|
57
|
+
# This is a code line - strip whitespace before wrapping in backticks
|
|
58
|
+
term = f'`{code_line.strip()}`'
|
|
59
59
|
|
|
60
60
|
# Add blank line before each term
|
|
61
61
|
lines.append('')
|
|
@@ -45,6 +45,11 @@ class CalloutDetector:
|
|
|
45
45
|
# Pattern for callout number in code block (can appear multiple times per line)
|
|
46
46
|
CALLOUT_IN_CODE = re.compile(r'<(\d+)>')
|
|
47
47
|
|
|
48
|
+
# Pattern for callout with optional preceding comment syntax
|
|
49
|
+
# Matches common comment styles: //, #, --, ;, followed by optional whitespace and <number>
|
|
50
|
+
# The comment syntax must be preceded by whitespace to avoid matching code operators
|
|
51
|
+
CALLOUT_WITH_COMMENT = re.compile(r'\s*(?://|#|--|;)\s*<\d+>|\s*<\d+>')
|
|
52
|
+
|
|
48
53
|
# Pattern for callout explanation line: <1> Explanation text
|
|
49
54
|
CALLOUT_EXPLANATION = re.compile(r'^<(\d+)>\s+(.+)$')
|
|
50
55
|
|
|
@@ -130,8 +135,9 @@ class CalloutDetector:
|
|
|
130
135
|
# Look for all callout numbers on this line
|
|
131
136
|
callout_matches = list(self.CALLOUT_IN_CODE.finditer(line))
|
|
132
137
|
if callout_matches:
|
|
133
|
-
# Remove
|
|
134
|
-
|
|
138
|
+
# Remove callouts AND preceding comment syntax from the line
|
|
139
|
+
# Use CALLOUT_WITH_COMMENT to remove both comment syntax and callout
|
|
140
|
+
line_without_callouts = self.CALLOUT_WITH_COMMENT.sub('', line).rstrip()
|
|
135
141
|
|
|
136
142
|
# Find all angle-bracket enclosed values
|
|
137
143
|
user_values = self.USER_VALUE_PATTERN.findall(line_without_callouts)
|
|
@@ -216,11 +222,11 @@ class CalloutDetector:
|
|
|
216
222
|
|
|
217
223
|
# Add value lines with context
|
|
218
224
|
if value_lines:
|
|
219
|
-
# Format: "
|
|
225
|
+
# Format: "`value`:"
|
|
220
226
|
value_text = value_lines[0] if value_lines else ""
|
|
221
227
|
# If value is code-like (contains backticks or special chars), keep it formatted
|
|
222
228
|
if value_text:
|
|
223
|
-
all_lines.append(f"
|
|
229
|
+
all_lines.append(f"{value_text}:")
|
|
224
230
|
|
|
225
231
|
# Add additional value lines if multi-line
|
|
226
232
|
for line in value_lines[1:]:
|
|
@@ -290,11 +296,14 @@ class CalloutDetector:
|
|
|
290
296
|
return explanations, i - 1
|
|
291
297
|
|
|
292
298
|
def remove_callouts_from_code(self, content: List[str]) -> List[str]:
|
|
293
|
-
"""
|
|
299
|
+
"""
|
|
300
|
+
Remove callout numbers and preceding comment syntax from code block content.
|
|
301
|
+
Handles multiple callouts per line and various comment styles (//, #, --, ;).
|
|
302
|
+
"""
|
|
294
303
|
cleaned = []
|
|
295
304
|
for line in content:
|
|
296
|
-
# Remove all callout numbers
|
|
297
|
-
cleaned.append(self.
|
|
305
|
+
# Remove all callout numbers with their preceding comment syntax
|
|
306
|
+
cleaned.append(self.CALLOUT_WITH_COMMENT.sub('', line).rstrip())
|
|
298
307
|
return cleaned
|
|
299
308
|
|
|
300
309
|
def validate_callouts(self, callout_groups: List[CalloutGroup], explanations: Dict[int, Callout]) -> Tuple[bool, set, set]:
|
|
@@ -200,6 +200,17 @@ class TableParser:
|
|
|
200
200
|
content=[part],
|
|
201
201
|
conditionals=[]
|
|
202
202
|
))
|
|
203
|
+
|
|
204
|
+
# Multi-cell line completes a row - finalize it
|
|
205
|
+
if current_row_cells:
|
|
206
|
+
rows.append(TableRow(
|
|
207
|
+
cells=current_row_cells.copy(),
|
|
208
|
+
conditionals_before=conditionals_before_row.copy(),
|
|
209
|
+
conditionals_after=conditionals_after_row.copy()
|
|
210
|
+
))
|
|
211
|
+
current_row_cells = []
|
|
212
|
+
conditionals_before_row = []
|
|
213
|
+
conditionals_after_row = []
|
|
203
214
|
else:
|
|
204
215
|
# Single cell on this line
|
|
205
216
|
if cell_content:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/requires.txt
RENAMED
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/rolfedh_doc_utils.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_fixture_archive_unused_files.py
RENAMED
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_fixture_archive_unused_images.py
RENAMED
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_fixture_check_scannability.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rolfedh_doc_utils-0.1.27 → rolfedh_doc_utils-0.1.28}/tests/test_table_callout_conversion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|