Browse Source

Merge develop into master (release/0.5.4)

undefined
Ben Kurtovic 5 years ago
parent
commit
fe738a41ff
5 changed files with 24 additions and 4 deletions
  1. +5
    -0
      CHANGELOG
  2. +1
    -1
      appveyor.yml
  3. +9
    -0
      docs/changelog.rst
  4. +3
    -3
      mwparserfromhell/__init__.py
  5. +6
    -0
      mwparserfromhell/parser/ctokenizer/tok_parse.c

+ 5
- 0
CHANGELOG View File

@@ -1,3 +1,8 @@
v0.5.4 (released May 15, 2019):

- Fixed an unlikely crash in the C tokenizer when interrupted while parsing
a heading.

v0.5.3 (released March 30, 2019):

- Fixed manual construction of Node objects, previously unsupported. (#214)


+ 1
- 1
appveyor.yml View File

@@ -1,6 +1,6 @@
# This config file is used by appveyor.com to build Windows release binaries

version: 0.5.3-b{build}
version: 0.5.4-b{build}

branches:
only:


+ 9
- 0
docs/changelog.rst View File

@@ -1,6 +1,15 @@
Changelog
=========

v0.5.4
------

`Released May 15, 2019 <https://github.com/earwig/mwparserfromhell/tree/v0.5.4>`_
(`changes <https://github.com/earwig/mwparserfromhell/compare/v0.5.3...v0.5.4>`__):

- Fixed an unlikely crash in the C tokenizer when interrupted while parsing
a heading.

v0.5.3
------



+ 3
- 3
mwparserfromhell/__init__.py View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2018 Ben Kurtovic <ben.kurtovic@gmail.com>
# Copyright (C) 2012-2019 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -27,9 +27,9 @@ outrageously powerful parser for `MediaWiki <http://mediawiki.org>`_ wikicode.
"""

__author__ = "Ben Kurtovic"
__copyright__ = "Copyright (C) 2012-2018 Ben Kurtovic"
__copyright__ = "Copyright (C) 2012-2019 Ben Kurtovic"
__license__ = "MIT License"
__version__ = "0.5.3"
__version__ = "0.5.4"
__email__ = "ben.kurtovic@gmail.com"

from . import (compat, definitions, nodes, parser, smart_list, string_mixin,


+ 6
- 0
mwparserfromhell/parser/ctokenizer/tok_parse.c View File

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


Loading…
Cancel
Save