Fix bug introduced in latest changes

This commit is contained in:
Richard Berger
2016-09-13 20:13:53 -04:00
parent c0360c3c13
commit dcd6dd2f81
2 changed files with 6 additions and 1 deletions

View File

@ -169,7 +169,7 @@ class RSTFormatting(Formatting):
def header(self, content, level):
header_content = content.strip()
header_content = re.sub(r'[0-9]+(\.[0-9]*)*\s+', '', header_content)
header_content = re.sub(r'[0-9]+\.([0-9]*\.?)*\s+', '', header_content)
header_underline = RSTFormatting.RST_HEADER_TYPES[level-1] * len(header_content)
return header_content + "\n" + header_underline + "\n"