| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #601. Merged in 6f87b32 from the md3 branch and did a lot of cleanup.
Changes include:
* Removed old docs build tool, templates, etc.
* Added MkDocs config file, etc.
* filename.txt => filename.md
* pythonhost.org/Markdown => Python-Markdown.github.io
* Markdown lint and other cleanup.
* Automate pages deployment in makefile with `mkdocs gh-deploy`
Assumes a git remote is set up named "pages". Do
git remote add pages https://github.com/Python-Markdown/Python-Markdown.github.io.git
... before running `make deploy` the first time.
|
|
|
|
|
| |
Ancestry exclusion for inline patterns.
Adds the ability for an inline pattern to define a list of ancestor tag names that should be avoided. If a pattern would create a descendant of one of the listed tag names, the pattern will not match. Fixes #596.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
If both open and close was not found in first block, additional blocks
were evaluated without context of previous blocks. The algorithm needs
to evaluate a buffer with the left bracket present. So feed in all
items and get the right bracket, then adjust the data_index to be
relative to the last block. Fixes #452.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
HRProcessor tried to access a member variable after recursively calling
itself. In certain situations HRProcessor will try to access its
member variable containing its match, but it will not be the same match
that call in the stack expected. This is easily fixed by storing the
match locally *before* doing any recursive work.
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| | |
Don’t allow spaces in image links. This was also causing an issue
where any text following a space was treated as a title. Ref #484.
|
| | |
|
|/
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
New versions of Pygments insert <span></span> blocks in the beginning
of the generated output sometimes [1], so we need to remove those blocks
before doing the actual checking.
[1]: https://bitbucket.org/birkenfeld/pygments-main/commits/164574c13533
|
|
|
|
|
|
|
| |
Now it should no longer print internal errors instead of intended ones
on Python 3.
Thanks to Maurice van der Pot for finding this fix.
|
| |
|
|
|
|
|
| |
The failure printed when self.assertTrue was used with str.startswith
did not show the string that was being searched.
|
|
|
|
|
|
| |
Added pygments to test-requirements and updated codehiliting tests to
only test partial output as output differs depending on Pygments version.
Fixes #453
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The option was buggy. Rather than try to fix it, it is being removed.
This feeture should exist as a seperate extension. Fixes #390.
|
|
|
|
| |
Fixes #389. Thanks for the report @lazka.
|
|
|
|
|
|
|
|
|
| |
Fixes #386. I'm doing this against my better judgement. The only reason is
that I'm using the HTML format suggested by the HTML5 Spec and will simply
not consider any alternate output. If a JavaScript library requires something
else, to bad. I don't care. That library should support the format
suggested by the spec or I'm not interested in it. If you want something else
then you can create your own extension which does whatever you want.
|
|
|
|
|
|
|
|
|
| |
I need to remember this is a lib first and not configure logging from within
the lib. Also, from the script we are now actually displaying deprecation
warnings. For some reason I don't understnad deprecation warnings are hidden
by default in Python. And who remembers to run Python with the `-Wd` flag
every time they upgrade a lib just to make sure there's no new deprecations?
Fixes #384.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the Table of Contents Extension instead. The HeaderId Extension will
raise a PendingDeprecationWarning.
The last few features of the HeaderID extension were mirgrated to TOC
including the baselevel and separator config options. Also, the
marker config option of TOC can be set to an empty string to disable
searching for a marker.
The `slugify`, `unique` and `stashedHTML2text` functions are now defined
in the TOC extension in preperation for the HeaderId extension being
removed. All coresponding tests are now run against the TOC Extension.
The meta-data support of the HeaderId Extension was not migrated and no plan
exists to make that migration. The `forceid` config option makes no sense in
the TOC Extension and the only other config setting supported by meta-data
was the `header_level`. However, as that depends on the template, it makes
more sense to not be defined at the document level.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Now, whenever the TOC extensiuon is loaded, the Markdown class instance
will always have a toc attribute (md.toc). Calling md.reset() will also
reset the toc attribute which defaults to an empty string.
|