()
| 83 | h3_re = re.compile(r"^###\s+(.+?)\s*$") |
| 84 | |
| 85 | def flush_lesson(): |
| 86 | nonlocal current_lesson |
| 87 | if current_lesson and current_module: |
| 88 | while current_lesson.body_lines and not current_lesson.body_lines[-1].strip(): |
| 89 | current_lesson.body_lines.pop() |
| 90 | current_module.lessons.append(current_lesson) |
| 91 | current_lesson = None |
| 92 | |
| 93 | for raw in lines: |
| 94 | line = raw.rstrip("\n") |
no test coverage detected