|
@@ -813,6 +813,9 @@ static int Tokenizer_parse_heading(Tokenizer* self) |
|
|
self->global ^= GL_HEADING; |
|
|
self->global ^= GL_HEADING; |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
if (!heading) { |
|
|
|
|
|
return -1; |
|
|
|
|
|
} |
|
|
#ifdef IS_PY3K |
|
|
#ifdef IS_PY3K |
|
|
level = PyLong_FromSsize_t(heading->level); |
|
|
level = PyLong_FromSsize_t(heading->level); |
|
|
#else |
|
|
#else |
|
@@ -892,6 +895,9 @@ static HeadingData* Tokenizer_handle_heading_end(Tokenizer* self) |
|
|
self->head = reset + best - 1; |
|
|
self->head = reset + best - 1; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
|
|
|
if (!after) { |
|
|
|
|
|
return NULL; |
|
|
|
|
|
} |
|
|
for (i = 0; i < best; i++) { |
|
|
for (i = 0; i < best; i++) { |
|
|
if (Tokenizer_emit_char(self, '=')) { |
|
|
if (Tokenizer_emit_char(self, '=')) { |
|
|
Py_DECREF(after->title); |
|
|
Py_DECREF(after->title); |
|
|