| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
Conflicts:
tests/test_extensions.py
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we only added the toc attribute (md.toc) if no Marker was
found within the document. However, that has caused framworks to do things
like force insert a marker, run convert, then extract the toc from the
body of the document. This is much cleaner. And if the user wants to add
the toc to the document also, they still can.
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/
|
|
|
|
| |
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.
|
|
|
| |
Fixes #375. Explains the difference between returning None and returning a modified root element. Also makes the docs more consistent with the doc strings in the code.
|
|\
| |
| | |
Correct the documentation for the slugify function
|
| |
| |
| |
| |
| | |
The previous requirements are incorrect, the method needs to accept two
parameters.
|
|\ \
| | |
| | | |
flake8ify
|
|/ / |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
By default, this only supports YAML deliminators (`---`) and adds no
additional behavior. In other words, parsing is unchanged. However, with
the `yaml` option set, PyYAML will parse the metadata.
Thanks to @kernc for suggesting the idea and doing the work on this.
|
| | |
| | |
| | |
| | | |
We are ready to start adding/changing features now.
|
| |/ |
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
I've decided to go with longer lines in the tests. Also fixed a couple
errors with the previous cleanup.
|
|
|
|
|
|
| |
Got all but a couple files in the tests (ran out of time today).
Apparently I have been using some bad form for years (although a few
things seemed to look better before the update). Anyway, conformant now.
|
| |
|
| |
|
|\
| |
| | |
Issue #368: Fix Markdown in raw HTML stops working
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\|
| |
| | |
Fix issue #365 and #366
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reworks the toc ordering to be done in a single pass with no
recursion. Very long documents with lots of headers can actually
exceed Python’s max recursion limit. By handling the toc ordering with
no recursion, large documents can no longer cause toc to fail with
recursion erros.
|
|/
|
|
|
|
|
|
|
|
|
| |
The logic for the current regex for strong/em and em/strong was sound,
but the way it was implemented caused some unintended side effects.
Whether it is a quirk with regex in general or just with Python’s re
engine, I am not sure. Put basically `(\*|_){3}` causes issues with
nested bold/italic. So, allowing the group to be defined, and then
using the group number to specify the remaining sequential chars is a
better way that works more reliably `(\*|_)\2{2}. Test from issue #365
was also added to check for this case in the future.
|
|
|
|
| |
Fixes #361.
|
|
|
| |
Fixes #359. Thanks for the report @gremmie.
|
|\
| |
| | |
Changed logging level when loading extensions
|
|/
|
| |
So it suppresses messages for loaded extensions when its used as third party.
|
|\
| |
| | |
Fix tail out of order issue
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This issue was discovered when dealing with nested inlines. In
treeprocessors.py it was incorrectly handling tails. In short, tail
elements were being inserted earlier than they were supposed to be.
In order to fix this, the insertion index should be incremented by 1 so
that when the tails are inserted into the parent, they will be just
after the child they came from.
Also added a test in nested-patterns to catch this issue.
|
|\
| |
| | |
Use Pygments API
|
|/ |
|
|
|
|
| |
Also removed an inacurate statement in the 2.5 release notes.
|
|
|
|
| |
Fixes #343. Thanks for the report @AlexJF.
|
|
|
|
|
|
|
|
|
| |
Fixes #253. Thanks to @facelessuser for the tests. Although I removed
a bunch of weird ones (even some that passed) from his PR (#342). For
the most part, there is no definitive way for those to be parsed. So
there is no point of testing for them. In most of those situations,
authors should be mixing underscores and astericks so it is clear
what is intended.
|
|
|
|
|
|
| |
See #253. Prior to this patch, if any inline processors returned an element
with a tail, the tail would end up empty. This resolves that issue and will
allow for #253 to be fixed. Thanks to @facelessuser for the work on this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we chnaged the order in import trys for short names extensions
(no dot syntax), an extra test was added to the import code for the
occassion when a naming conflict exists. For example, if PyTables
is installed (module name is tables) and the user tries to use
the short name 'tables' instead of 'markdown.extensions.tables'.
Fixes #341.
Of course, this code will get ripped out when the old behavior is
fully deprecated.
|
|
|
|
|
|
| |
The new option parser assumes bool values if the default is bool or
None. As the "title" option is not a bool value, it should default to an
empty string rather than None. Fixes #347.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Both `safe_mode` and `html_replacement_test` keywords are
pending deprecation, as are positional args. Closes #337.
|