While working on a test case for Format Paragraph (http://bugs.python.org/issue18226) I noted that format paragraph doesn't work with comment blocks when a comment block is selected. The fix is very simple by changing one line:
if first and last:
data = text.get(first, last)
comment_header = get_comment_header(data)
else:
The comment_header line was changed from comment_header = ''. This forces the format paragraph extension to always do "just a normal text format". Attached is a patch but I would like to explore the bug in more detail and make sure all cases are covered. |