| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additional CSS classes names can be appended to the admonition name
using spaces as separators.
The following markdown:
!!! note floatright
This is a floating note.
Generates the following HTML code:
<div class="admonition note floatright">
<p class="admonition-title">Note</p>
<p>This is a floating note.</p>
</div>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All file-based tests are now defined as unittest test cases via a
metaclass which walks a directory and builds a unittest for each pair
of test files.
To run the tests just run `python -m unittest discover tests`. Or use
tox as the tox config has been updated to run the new tests and all nose
specific code has been removed.
The test generator tools have been removed as well. If any changes or
additions need to be made to tests, they should be implemented using
the new framework rather than with the file-based tests. Eventually,
only the PHP and pl tests should remain as file-based tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preserve the line which a reference was on to prevent raw HTML indexing issue. Fixes #584.
Prevent raw HTML parsing issue in abbr and footnotes
Peserve abbreviation line when stripping and preserve a line for each footnote block. Footnotes should also accumulate the extraneous padding.
Test extra lines at the end of references
Strip the gathered extraneous whitespace
When processing footnotes, we don't actually care to process the extra whitespace at the end of a footnote, but we want it to calculate lines to preserve.
|
|
|
|
|
|
|
| |
Also consume to the end of the first line of any admonition. Everything after
the title is discarded. However, the only thing that will match should be
whitespace so it should be a non-issue.
Fixes #550.
|
|
|
|
|
|
| |
Single column tables are valid tables, so add back in the accidentally
removed functionality of allowing single column tables, but with one
exception -- table bodies should not render empty (an empty
`<tbody>` is invalid HTML. Fixes #539.
|
|
|
|
|
|
|
| |
Fixes #412 and #493. First we parse footnote content as
its own document avoid quirks with using li as a parent. Second, we
surround placeholders with STX and ETX to prevent them from interfering
with inline parsing; this is also consistent with how placeholders are
used everywhere else in Python Markdown.
|
|
|
|
|
|
| |
Track when we find duplicate footnote references and create unique ids
for them. Then add an additional tree-processor after inline to go
back and update the footnotes with additional back references that link
to the duplicate footnote references. Fixes #468.
|
|
|
|
|
| |
This aims to escape code in a more expected fashion. This handles
when backticks are escaped and when the escapes before backticks are
escaped.
|
|
|
|
|
|
|
| |
Tables now handle escaped pipes when testing, in table borders, and in
the inline content. To achieve properly, a bug had to be fixed related
to appending escaped chars to the Markdown class. Now appended chars
only appear in the current instance. Lastly the first backtick in a
table can be escaped rounding out the last corner case.
|
|
|
|
| |
At some point the logic of counting backticks and determining if they are odd or even was used to parse a row's text into cells. Unfortunately this approach broke expected code parsing logic in a table. We essentially traded one bug for another. This fixes table backtick handling and restores sane backtick logic while preserving existing fixes. (issue #449)
|
| |
|
|
|
|
| |
Related to #498.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix table alignment when seperator contains spaces
eg. seperator like "------ | :----- | :----: | -----: | ------"
* Update tests for table
* Delete the newline at the end of tables.html
|
| | |
|
|/
|
|
|
|
| |
This will probably not result in the output intending by the author, but
the syntax would be incorrect so the author needs to edit the document
anyway. We just need to ensure the parser does not crash here. Fixes #498.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|