All Versions
Latest Version
Avg Release Cycle
55 days
Latest Release
1771 days ago

Changelog History

  • v0.7.2 Changes

    June 08, 2019


    • ๐Ÿ›  Fixed incorrect handling of loose list (#54, #65, thanks @Rogdham and @vallentin)
    • ๐Ÿ›  Fixed FileWrapper backstep after StopIteration (#58, thanks @Rogdham)
    • ๐Ÿ‘ Allow more than one level of token subclass (#62, thanks @Rogdham)
    • Tables can handle rows with missing columns (#67, thanks @Grollicus)
    • ๐Ÿ›  Fixed unresolved reference (#73, thanks @vallentin)
    • ๐Ÿ›  Fixed EOL markers in LaTeX tables (#79, thanks @liuq)

    โœ… Testing:

    • โž• Add Python 3.7 to integration testing (#63, thanks @nikolas)
  • v0.7.1 Changes

    June 25, 2018

    Fixed :

    • only matching the first instance of InlineCode (#50, thanks @huettenhain);
    • normalize newlines after every line (#51, thanks @elebow and @rsrdesarrollo);
    • trailing characters after reference definition.

    ๐ŸŽ Performance :

    • ๐Ÿ“œ small speed boost to ParseToken.append_child.
  • v0.7 Changes

    June 11, 2018

    Warning : this is a release that breaks backwards compatibility in non-trivial ways (hopefully for the last time!) Read the full release notes if you are updating from a previous version.

    ๐Ÿ”‹ Features :

    • ๐Ÿฑ all tests passing in CommonMark test suite (finally! ๐ŸŽ‰)
    • ๐Ÿ‘ allow specifying span token precedence levels;
    • ๐Ÿ†• new and shiny span_tokenizer.tokenize.

    ๐Ÿ›  Fixed :

    • โœ… well, all the CommonMark test cases..
    • ASTRenderer crashes on tables with headers (#48, thanks @timfox456!)

    Where I break backwards compatibility :

    ๐Ÿ“œ Previously span-level tokens need to have their children attribute manually specified. This is no longer the case, as the children attribute will automatically be set based on the class variable parse_group, which correspond to the regex match group in which child tokens might occur.

    As an example, previously GithubWiki is implemented as this:

    from mistletoe.span\_token import SpanToken, tokenize\_innerimport reclass GithubWiki(SpanToken): pattern = re.compile(r'...') def \_\_init\_\_(self, match\_obj): super().\_\_init\_\_(match\_obj) # alternatively, self.children = tokenize\_inner(match\ = match\

    Now we can write:

    from mistletoe.span\_token import SpanTokenimport reclass GithubWiki(SpanToken): pattern = re.compile(r'...') parse\_inner = True# default value, can be omitted parse\_group = 1# default value, can be omitted precedence = 5# default value, can be omitteddef \_\_init\_\_(self, match\_obj): = match\

    ๐Ÿ“œ If we have a span token that does not need further parsing, we can write:

    class Foo(SpanToken): pattern = re.compile(r'(foo)') parse\_inner = Falsedef \_\_init\_\_(self, match\_obj): self.content = match\

    ๐Ÿ‘€ See the readme for more details.

  • v0.6.2 Changes

    May 27, 2018

    Features :

    • CommonMark compliant CodeFence;
    • CommonMark compliant BlockCode;
    • CommonMark compliant HTMLBlock;
    • CommonMark compliant HTMLSpan;
    • CommonMark compliant AutoLink;
    • CommonMark compliant InlineCode;
    • CommonMark compliant Heading;
    • CommonMark compliant SetextHeading;
    • โž• added span-level token LineBreak;
    • ๐Ÿ‘ better handling of lazy-continuation in Quote;
    • Footnotes can be defined in any block-level containers.

    ๐Ÿ›  Fixes :

    • loose lists conform to CommonMark spec (#44, thanks @huettenhain);
    • ๐Ÿ“œ not parsing sub-lists deeper than two levels (#46, thanks @daerhu);
    • FileWrapper._index should not go below -1.

    Development :

    • ๐Ÿ”จ refactored handling of SetextHeading;
    • โœ‚ removed block_tokenizer.MismatchException;
    • โœ‚ removed _children attribute, using children directly; (potentially breaking change?)
    • ๐Ÿ“‡ renamed Separator to ThematicBreak;
    • ๐Ÿ“‡ renamed FootnoteBlock to Footnote;
    • tokenize and tokenize_inner returns lists of tokens;
    • ๐Ÿ”จ refactored CommonMark testing script.
  • v0.6.1 Changes

    May 13, 2018

    Features :

    • CommonMark compliant CodeFence (#41);
    • ๐Ÿ‘ allow multiple backticks for InlineCode;
    • strips whitespace around InlineCode;

    ๐Ÿ›  Fixed :

    • Separator needs at least three characters;
    • indented code blocks should not interrupt paragraphs (#40, thanks @joncass);
    • crashes when sublists have different marker type (#42, thanks @JBartlett86);
    • typo in (#43, thanks @NatTupper);
    • ๐Ÿ›  preliminary fixes for handling loose lists (#44, thanks @huettenhain);
    • โœ‚ removed corrupted block_token.until function;
    • html code language tags starts with "language-".
  • v0.6 Changes

    May 02, 2018


    • โž• added Pygments renderer to contrib (#35, thanks to @Bridouz);
    • ๐Ÿ‘ HTMLSpan now supports comments (#37);
    • (more or less) Commonmark compliant List implementation (#40).

    ๐Ÿ›  Fixes:

    • ๐Ÿ”„ changed logo to an actual mistletoe (#21, thanks to @liuq);
    • ๐Ÿ‘ allow lists after block tokens without newlines (#34, thanks to @huettenhain);
    • recognize headings within paragraphs (#36);
    • disallow opening space in html tag (#37).

    ๐ŸŽ Performance :

    • โœ‚ removed FileWrapper.normalize;
    • utilized universal newline mode.

    ๐Ÿ’ฅ Breaking changes :

    • BlockToken.start does not advance file iterator.

    Special shout-out to @joncass for raising the unattributed issues above, and giving me the motivation to finally fix the list implementation!

    ๐Ÿš€ Note that this is a release with major changes. If you notice any rough edges (as there will certainly be), please do not hesitate to open an issue.

  • v0.5.5 Changes

    April 15, 2018


    • โž• added default render methods for all tokens;
    • added reset_tokens function to block_token and span_token;
    • ๐Ÿ‘ allowed to return any iterable;
    • BaseRenderer is now available at mistletoe.BaseRenderer;
    • โž• added Scheme.

    ๐Ÿ›  Fixes:

    • ๐Ÿ‘ throw better AttributeError when accessing RawText.children (#31, thanks @jabdoa2);
    • disallow whitespace in span_token.Link (#32, thanks @DMRobertson);
    • ๐Ÿ‘ allowed empty alt text in Image and FootnoteImage (#33, thanks @joncass).
  • v0.5.4 Changes

    March 27, 2018

    Features :

    • md2jira: read from stdin if no input file is given (#27, thanks @alexkolson!);
    • ๐Ÿ‘ better command line options and help messages;
    • auto-splitlines when mistletoe.markdown is given a string;
    • inline tokens can span multiple lines (#30, thanks @duckwork!).

    ๐Ÿ›  Fixes :

    • ๐Ÿ‘ TableRow now supports table shorthand (#29, thanks @huettenhain!);
    • normalize line breaks.

    ๐Ÿ“š ... plus various refactors and documentation improvements.

  • v0.5.3 Changes

    February 05, 2018

    Features :

    • shortened mistletoe.markdown keyword argument name (renderer_cls to renderer);
    • โœ‚ removed List reference lookup;
    • list items can contain paragraphs (CM5.2);
    • shorthand syntax added for tables (#26).

    ๐Ÿ›  Fixed :

    • ignored invisible characters at line end for CodeFence (#24);
    • ๐Ÿ›  fixed extra newlines for headings in JIRARenderer (#25, thanks @huettenhain!);

    Development :

    • ๐Ÿ“š moved documentation to docs directory;
    • solved the biggest mystery in the codebase.
  • v0.5.2 Changes

    January 30, 2018

    Fixed :

    • contrib/ was importing from the wrong directory (#20, thanks to @cctile);
    • characters in LaTeX lstlisting environment should not be escaped (#23, thanks to @liuq).