summaryrefslogtreecommitdiff
path: root/tests/test_legacy.py
Commit message (Collapse)AuthorAgeFilesLines
* Port all smarty tests to the new frameworkHEADmasterDmitry Shachnev2023-05-161-5/+0
|
* Use pyspelling to check spelling.Waylan Limberg2023-04-061-17/+9
| | | In addition to checking the spelling in our documentation, we are now also checking the spelling of the README.md and similar files as well as comments in our Python code.
* docs: Fix a few typosTim Gates2022-07-251-1/+1
| | | | | | | | | | | | | | | | | There are small typos in: - docs/extensions/fenced_code_blocks.md - docs/extensions/meta_data.md - markdown/extensions/codehilite.py - markdown/extensions/footnotes.py - tests/test_legacy.py Fixes: - Should read `delimiters` rather than `deliminators`. - Should read `shebang` rather than `sheband`. - Should read `processing` rather than `proccesing`. - Should read `backslash` rather than `blackslash`. Signed-off-by: Tim Gates <tim.gates@iress.com>
* Update th/td to use style attributeGaige B Paulsen2022-05-051-2/+0
| | | | | | | | | | This allows better interoperation with CSS style sheets, as the align object on the TH is skipped if the css uses 'text-align: inherit' and the previous 'text-align' is used instead (or the default: left). Added an override to restore the original `align` behavior Moved existing tests to the new test infrastructure Added new tests to test the configuration parameter Updated documentation to document the configuration parameter.
* Fix typos and remove trailing spacesKian-Meng Ang2022-04-101-2/+2
|
* Tune attr list regexWaylan Limberg2020-06-301-2/+0
| | | | | | | | | | | Ignore empty braces. Braces must contain at least one non-whitepsace character to be recognized as an attr list. Attr lists for table cells must be at the end of the cell content and must be seperated from the content by at least one space. This appears to be a breaking change. However, it is consistent with the behavior elsewhere. Fixes #898.
* Refactor fenced_code & codehilite options (#816)Waylan Limberg2020-06-231-2/+0
| | | | | | | | | | | | | | | | | | | | * Add `language-` prefix to output when syntax highlighting is disabled for both codehilite and fenced_code extensions. * Add `lang_prefix` config option to customize the prefix. * Add a 'pygments' env to tox which runs the tests with Pygments installed. Pygments is locked to a specific version in the env. * Updated codehilite to accept any Pygments options. * Refactor fenced code attributes. - ID attr is defined on `pre` tag. - Add support for attr_list extension, which allows setting arbitrary attributes. - When syntax highlighting is enabled, any pygments options can be defined per block in the attr list. - For backward compatibility, continue to support `hi_lines` outside of an attr_list. That is the only attr other than lang which is allowed without the brackets (`{}`) of an attr list. Note that if the brackets exist, then everything, including lang and hl_lines, must be within them. * Resolves #775. Resolves #334. Addresses #652.
* Drop support for Python 2.7 (#865)Hugo van Kemenade2019-10-241-1/+0
| | | | | | | * Python syntax upgraded using `pyupgrade --py3-plus` * Travis no longer uses `sudo`. See https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration See #760 for Python Version Support Timeline and related dicussion.
* Refactor options testsWaylan Limberg2018-07-311-6/+0
|
* smart_emphasis keyword > legacy_em extension.Waylan Limberg2018-07-311-2/+0
| | | | | | | | | The smart_strong extension has been removed and its behavior is now the default (smart em and smart strong are the default). The legacy_em extension restores legacy behavior (no smart em or smart strong). This completes the removal of keywords. All parser behavior is now modified by extensions, not by keywords on the Markdown class.
* Remove lazy_ol keyword. Use sane_lists extension instead.Waylan Limberg2018-07-311-2/+0
| | | | This was adapted from 11408e50 of the md3 branch.
* Removed unnessecary no attributes test. (#694)Waylan Limberg2018-07-311-2/+0
| | | This was missed in #683.
* Consistent copyright headers.Waylan Limberg2018-07-271-0/+22
| | | | Fixes #435.
* Moved enable_attributes keyword to extension: legacy_attrs.Waylan Limberg2018-07-241-1/+1
| | | | | | | If you have existing documents that use the legacy attributes format, then you should enable the legacy_attrs extension for those documents. Everyone is encouraged to use the attr_list extension going forward. Closes #643. Work adapted from 0005d7a of the md3 branch.
* Refactor Extension loading (#627)Waylan Limberg2018-01-121-41/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecated naming support is removed: * Removed special treatment for modules in `markdown.extensions` * Removed support for `mdx_` prefixes. Support for Entry Point names added: Support for "short names" are now implemented with entry points. Therefore all the users who call extension names as `toc` will not get errors as the builtin extensions all have entry points defined which match the old "short names" for modules in `markdown.extensions`. The benefit is that any extension can offer the same support without requiring the user to manually copy a file to that location on the file system (way to many extension authors have included such instructions in their installation documentation). The one odd thing about this is that we have been issuing a DeprecationWarning for short names and now they are fully supported again. But I think it's the right thing to do. Support for using dot notation is not removed. After all, it was never deprecated. And we shouldn't "force" entry points. There are plenty of reasons why users may not want that and not all of them can be resolved by using class instances instead. All of the following ways to load an extension are valid: # Class instance from markdown.extensions.toc import TocExtension markdown.markdown(src, extensions=[TocExtension()] # Entry point name markdown.markdown(src, extensions=['toc']) # Dot notation with class markdown.markdown(src, extensions=['markdown.extensions.toc:TocExtension']) # Dot notation without class markdown.markdown(src, extensions=['markdown.extensions.toc'])
* Removed deprecated safe_mode.Waylan Limberg2018-01-111-9/+0
|
* Switch from nose to unittestWaylan Limberg2018-01-081-0/+213
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.