Commit 3864f84c authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix regex for lettered bullet list

parent 3bb928cf
Loading
Loading
Loading
Loading
Loading
+4 −1
Changes for generateBaseline/pandocFilter.py: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -572,8 +572,11 @@ def replaceBulletedLettersLists(progress:Progress, mdLines:list[str]) -> list[st
	_taskID = progress.add_task('[blue]Replacing bulleted letters lists', total=0)
	# progress.update()
	
	# Match "- " only when followed by a letter and either ")" (e.g. "- a) text" or "." (e.g. - a. text" ).
	# Match "- " only when followed by a letter, ")" or ".", and a space
	# (e.g. "- a) text", "- a. text"). Require the space so identifiers like
	# "- Device.deviceInfo" are not treated as lettered lists.
	bulletedLettersListRegex = re.compile(r'^([ \t]*)- (?=[A-Za-z]+[).] )')

	_lines:list[str] = []
	for line in mdLines:
		# If we are in a code block, we are not in a list