Strips unnecessary whitespaces/tabs if first header is not left-aligned
(headlines)
| 175 | return out_contents, headlines |
| 176 | |
| 177 | def positioningHeadlines(headlines): |
| 178 | """ |
| 179 | Strips unnecessary whitespaces/tabs if first header is not left-aligned |
| 180 | """ |
| 181 | left_just = False |
| 182 | for row in headlines: |
| 183 | if row[-1] == 1: |
| 184 | left_just = True |
| 185 | break |
| 186 | if not left_just: |
| 187 | for row in headlines: |
| 188 | row[-1] -= 1 |
| 189 | return headlines |
| 190 | |
| 191 | def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False): |
| 192 | """ |