Skip to content

Commit cb444dd

Browse files
Rossi-Lucianoclaude
andcommitted
Corrige AttributeError em bloco <list> quando regex não encontra list-type
Fallback para "bullet" quando o parágrafo não contém o padrão esperado. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 57bcbbc commit cb444dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

markup_doc/xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def get_xml(article_docx, data_front, data, data_back, xref_map=None):
627627

628628
if d["value"]["label"] == "<list>":
629629
re_search = re.search(r'list list-type="(.*?)"\]', d["value"]["paragraph"])
630-
list_type = re_search.group(1)
630+
list_type = re_search.group(1) if re_search else "bullet"
631631
attrib = {"list-type": list_type}
632632

633633
if subsec:

0 commit comments

Comments
 (0)