Changelog History
-
v0.7.2 Changes
June 08, 2019Fixed:
- ๐ Fixed incorrect handling of loose list (#54, #65, thanks @Rogdham and @vallentin)
- ๐ Fixed
FileWrapper
backstep afterStopIteration
(#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:
-
v0.7.1 Changes
June 25, 2018Fixed :
- 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
.
- only matching the first instance of
-
v0.7 Changes
June 11, 2018Warning : 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 thechildren
attribute will automatically be set based on the class variableparse_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\_obj.group(1))self.target = match\_obj.group(2)
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): self.target = match\_obj.group(2)
๐ 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\_obj.group(1)
๐ See the readme for more details.
-
v0.6.2 Changes
May 27, 2018Features :
- 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
; Footnote
s 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, usingchildren
directly; (potentially breaking change?) - ๐ renamed
Separator
toThematicBreak
; - ๐ renamed
FootnoteBlock
toFootnote
; tokenize
andtokenize_inner
returns lists of tokens;- ๐จ refactored CommonMark testing script.
- CommonMark compliant
-
v0.6.1 Changes
May 13, 2018Features :
- 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
Paragraph.read
(#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-
".
- CommonMark compliant
-
v0.6 Changes
May 02, 2018Features:
- โ 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.
- โ added Pygments renderer to
-
v0.5.5 Changes
April 15, 2018Features:
- โ added default render methods for all tokens;
- added
reset_tokens
function toblock_token
andspan_token
; - ๐ allowed
BlockToken.read
to return any iterable; - BaseRenderer is now available at mistletoe.BaseRenderer;
- โ added Scheme.
๐ Fixes:
-
v0.5.4 Changes
March 27, 2018Features :
- 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, 2018Features :
- shortened
mistletoe.markdown
keyword argument name (renderer_cls
torenderer
); - โ 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.
- shortened
-
v0.5.2 Changes
January 30, 2018