| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Drppoed the non-greedy quantifier from the end of the inlinePatterns as it
served no useful purpose and was actually (in very rare edge cases) causing
newlines to be dropped. FIxes #439. Thanks to @munificent for the report.
|
| |
|
|
|
|
|
|
|
|
|
| |
This should fix the remaining corner cases that can cause infinite
loops. Previous iterations did not account for scenarios where the
“end” index was less than the “start” index. If the “end” index is
ever less than or equal to the “start” index, the “end” will be
adjusted to to be “start” + 1 allow the full range to be extracted and
replaced.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The previous version did not work, and was incorrectly removed as part of
85ad18071d619251. In the new version, use lookbehind search for \w instead
of \b, so that it works.
Update the tests accordingly.
Fixes #399 (except parts that we can't fix). Thanks @gandaro for the report.
|
|
|
|
| |
Fixes #389. Thanks for the report @lazka.
|
|
|
|
|
|
|
|
|
| |
Fixes #380. The TOC replacement is now seperate from building the
TOC, which allows us to iter through the doc in order rather than
with the non-order-preserving interparent pethod. This is almost a
complete refactor of the run method. Also cleaned up the config stuff.
Thanks to @colewerner for the report and test case.
|
|
|
|
|
|
|
| |
Originally there was an infinite loop issue that was patched in issue
#308. Unfortunately, it was fixed all the way. This fix patches the
infinite loop fix to only add an offset to the `right_listindex` when
it is in a infinite loop scenario.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #340. The "inline" TreeProcessor runs before the "prettify"
TreeProcessor, but the "smarty" TreeProcessor (wich is just another
instance of `InlineProcessor`) runs after the "prettify" TreeProcessor.
The problem was that the "prettify" TreeProcessor was losing the
AtomicString quality of the text of code blocks (any operation
on a string creates a new string. When that string is an AtomicString,
the new string must explicitly be declared as an AtomicString.
As the "prettify" TreeProcessor cleans up newlines on code blocks,
it was changing the AtomicString to a normal string. And as
`InlineProcessor` identifies what elements to skip solely by whether
the text is an AtomicString, the "smarty" instance was running on
code blocks.
Importantly, I added a test of code blocks and spans for smarty,
so this shouldn't break again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last few extensions were updated to accept dicts/**kwargs as configs and more
tests were updated. Also updated extra to actually accept configs.
Note that extra requires an extra level of dicts. First you need
to indicate tha the settings are for extra, then, which extension
extra wraps. I'm not crazy abount this, bit not sur ehow else to do it
without making all the configs a global attribute on the Markdown class
to that any extention can access any other extensions config settings.
I don't think we wnat to do that.
Also updated extra to use dot notation for the sub-extensions.
|
|
|
|
|
|
|
|
|
|
| |
All named extensions now use python dot notation in the tests - including
all builtin extensions (eg: 'extra' => 'markdown.extensions.extra'). This
is in anticipation of #336.
Note there are a few tests (in the error tests) that will still need
updating, but not till we make the change as they will test for the
new error message.
|
| |
|
| |
|
| |
|
|
|
|
| |
See <http://en.wikipedia.org/wiki/Guillemet>.
|
|
|
|
| |
generates opening double quote.
|
|\
| |
| | |
Make smarty extension work together with attr_list
|
| |
| |
| |
| | |
To make it easier to notice (and fix) the failure.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously, the code was ignoring whether this was a new term when determining
whether the currect item should be loose or not. Fixes #243. Thanks for the
report @Anomareh.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Like headers (h1-6) dt's can only be on one line, so we need to use
the header regex on dt's. This was implemented after considering a recent
[discussion](http://six.pairlist.net/pipermail/markdown-discuss/2013-July/002859.html)
on the markdown mailing list. Prior to that discussion, I never considered
that it was impossable to set block level attrs on dt's. Now it is.
|
|
|
|
|
|
|
|
|
|
| |
A header can be only one line - so unlike other block level elements, a
attr_list must be at th eend of the line. To disingush it from an inline
attr_list on the last child in a header, we must require at least one
space before th eblock-level attrt_list.
Always intended it to work that way. Not sure how I missed that before.
At least we're testing for it now.
|
|
|
|
|
|
|
|
|
|
| |
Not sure how I missed that when committing ea4af0d. Also as a side-effect,
this fixes #230 - which brought my previous oversight to my attention.
Thanks for the report @divisoryang.
Also added some tests - including tests of list items without attr_lists.
Sometimes I forget to test markup that does not use an extension when an
extension is enabled. That's what resulted in #230 being reported.
|
|
|
|
|
|
| |
A list item with a nested list complicates were the attr_list can be.
Fixes #218. Thanks for the report @jpzimmer.
|
| |
|
| |
|
|
|
|
|
| |
If an adminition title is capitalized, the html class on the
div should still be lowercased.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
docs/extensions/index.txt
tests/extensions/test.cfg
|
| |
| |
| |
| |
| |
| | |
Fixes #177. When using both extensions, breaks (`<br>`) must have a linebreak (`\n`) after them before attr_list is run. This patch reorders the treeprocessors so that happens ('attr_list' runs after 'prettify' not before).
Also had to alter headerid extension so it runs after 'prettify' or it would run before 'attr_list' if loaded before 'attr_list' by user.
|
| |
| |
| |
| | |
Fixes #171. While that report provided an example of an unordered list item that started with a colon, any block that starts with a colon and has no siblings before it (paragraph as begining if document, list item, etc) all exhibit this same behavior. Following PHP Markdown Extra's lead, these are not definition items as they have no term before them.
|
| |
| |
| |
| | |
crash the serealizer.
|
| |
| |
| |
| | |
use an explicit blank title to not have the <p> tag with the title rendered.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As HTML5 has depreciated use of `rev=anything` and `rel=footnotes`, they are no
longer inlcuded in the output when the output_format is set to HTML5. Note that
if someone successful registers a spec for `rel=footnotes` in the future (as
a microformat), then that could be considered valid. But until that happens,
it is invlaid to use in HTML5. Therefore, we remove it from the output (when
outputing HTML% only).
As an alternative, two new classes are set (in all output_formats). On the link
to the footnote (where `rel=footnotes` was used), we set `class=footnote-ref`
and on the backlink (where `rev=footnote` was used), we set
`class=footnote-backref`.
Also updated the tests to reflect to the new classes in the output.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is an extension which alters the behavior of lists to be less surprising.
If turned out to be rather simple to code. I'm surprised no one had written it
yet.
I should note that this extension does not generate separate lists if different
unordered list markers are used (`*` verses `-` verses `+`) The way the parser
works that would be a little more tricky.
|