(h: str)
| 20 | |
| 21 | |
| 22 | def format_lists(h: str) -> str: |
| 23 | a = h.splitlines() |
| 24 | r = [] |
| 25 | i = 0 |
| 26 | bullets = ("- ", "* ", " * ") |
| 27 | while i < len(a): |
| 28 | if a[i].startswith(bullets): |
| 29 | r.append("<p><ul>") |
| 30 | while i < len(a) and a[i].startswith(bullets): |
| 31 | r.append("<li>%s" % a[i][2:].lstrip()) |
| 32 | i += 1 |
| 33 | r.append("</ul>") |
| 34 | else: |
| 35 | r.append(a[i]) |
| 36 | i += 1 |
| 37 | return "\n".join(r) |
| 38 | |
| 39 | |
| 40 | def format_code(h: str) -> str: |
no test coverage detected
searching dependent graphs…