Hello community, here is the log from the commit of package python-Markups for openSUSE:Factory checked in at 2019-01-15 09:15:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Markups (Old) and /work/SRC/openSUSE:Factory/.python-Markups.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Markups" Tue Jan 15 09:15:51 2019 rev:6 rq:662466 version:3.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Markups/python-Markups.changes 2017-09-04 12:33:57.183502609 +0200 +++ /work/SRC/openSUSE:Factory/.python-Markups.new.28833/python-Markups.changes 2019-01-15 09:15:51.474264387 +0100 @@ -1,0 +2,20 @@ +Wed Jan 2 12:46:35 UTC 2019 - [email protected] + +- Update to version 3.0.0: + * The deprecated AbstractMarkup API has been removed. + * Python 3.2 is no longer supported. + * The output now uses HTML5 instead of HTML4. + * The custom markups are now registered with entry points. + * The ``get_custom_markups()`` method has been removed. + * New required dependency: python-markdown-math. + * Python-Markdown 3.x release is now supported. +- Add python-markdown-math to Requires (new dependency). +- Run fdupes to clean up duplicate files wasting space (add + BuildRequires: fdupes). + +------------------------------------------------------------------- +Tue Dec 4 12:50:17 UTC 2018 - Matej Cepl <[email protected]> + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- Old: ---- Markups-2.0.1.tar.gz New: ---- Markups-3.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Markups.spec ++++++ --- /var/tmp/diff_new_pack.VlHuZT/_old 2019-01-15 09:15:51.894263996 +0100 +++ /var/tmp/diff_new_pack.VlHuZT/_new 2019-01-15 09:15:51.898263993 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-Markups # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,16 +18,20 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Markups -Version: 2.0.1 +Version: 3.0.0 Release: 0 Summary: A wrapper around various text markups License: BSD-3-Clause Group: Development/Languages/Python -Url: https://github.com/mitya57/pymarkups +URL: https://github.com/mitya57/pymarkups Source: https://files.pythonhosted.org/packages/source/M/Markups/Markups-%{version}.tar.gz -BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes BuildRequires: python-rpm-macros +# SECTION Required for %%check +BuildRequires: %{python_module markdown-math} +# /SECTION +Requires: python-markdown-math BuildArch: noarch %python_subpackages @@ -44,12 +48,14 @@ %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + %check %python_exec setup.py test %files %{python_files} -%defattr(-,root,root,-) -%doc LICENSE README.rst changelog +%license LICENSE +%doc README.rst changelog %{python_sitelib}/* %changelog ++++++ Markups-2.0.1.tar.gz -> Markups-3.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/.travis.yml new/Markups-3.0.0/.travis.yml --- old/Markups-2.0.1/.travis.yml 2017-06-24 21:44:09.000000000 +0200 +++ new/Markups-3.0.0/.travis.yml 2018-05-03 16:03:56.000000000 +0200 @@ -2,12 +2,12 @@ language: python python: - "2.7" - - "3.2" - "3.3" - "3.4" - "3.5" - "3.6" - "pypy" - "pypy3" -install: pip install Markdown docutils textile -script: python -m unittest discover -s tests -v +install: pip install Markdown docutils textile pygments codecov +script: coverage run setup.py test +after_success: codecov diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/LICENSE new/Markups-3.0.0/LICENSE --- old/Markups-2.0.1/LICENSE 2015-08-07 20:37:13.000000000 +0200 +++ new/Markups-3.0.0/LICENSE 2018-05-03 16:46:13.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright 2012-2015 Dmitry Shachnev <[email protected]>. +Copyright 2012-2018 Dmitry Shachnev <[email protected]>. All rights reserved. Redistribution and use in source and binary forms, with or without diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/Markups.egg-info/PKG-INFO new/Markups-3.0.0/Markups.egg-info/PKG-INFO --- old/Markups-2.0.1/Markups.egg-info/PKG-INFO 2017-06-24 21:49:03.000000000 +0200 +++ new/Markups-3.0.0/Markups.egg-info/PKG-INFO 2018-05-03 17:12:53.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: Markups -Version: 2.0.1 +Version: 3.0.0 Summary: A wrapper around various text markups Home-page: https://github.com/retext-project/pymarkups Author: Dmitry Shachnev @@ -10,6 +10,12 @@ .. image:: https://api.travis-ci.org/retext-project/pymarkups.svg :target: https://travis-ci.org/retext-project/pymarkups :alt: Travis CI status + .. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg + :target: https://codecov.io/gh/retext-project/pymarkups + :alt: Coverage status + .. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest + :target: https://pymarkups.readthedocs.io/en/latest/ + :alt: ReadTheDocs status This module provides a wrapper around various text markup languages. @@ -48,7 +54,7 @@ The release version can be downloaded from PyPI_. The source code is hosted on GitHub_. - .. _PyPI: https://pypi.python.org/pypi/Markups + .. _PyPI: https://pypi.org/project/Markups/ .. _GitHub: https://github.com/retext-project/pymarkups The documentation is available online_ or can be generated from source by @@ -56,7 +62,7 @@ python3 setup.py build_sphinx - .. _online: https://pythonhosted.org/Markups/ + .. _online: https://pymarkups.readthedocs.io/en/latest/ .. _Sphinx: http://www.sphinx-doc.org/en/stable/ Platform: UNKNOWN @@ -67,7 +73,6 @@ Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 @@ -75,3 +80,7 @@ Classifier: Topic :: Text Processing :: Markup Classifier: Topic :: Text Processing :: General Classifier: Topic :: Software Development :: Libraries :: Python Modules +Provides-Extra: Markdown +Provides-Extra: Textile +Provides-Extra: highlighting +Provides-Extra: reStructuredText diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/Markups.egg-info/SOURCES.txt new/Markups-3.0.0/Markups.egg-info/SOURCES.txt --- old/Markups-2.0.1/Markups.egg-info/SOURCES.txt 2017-06-24 21:49:04.000000000 +0200 +++ new/Markups-3.0.0/Markups.egg-info/SOURCES.txt 2018-05-03 17:12:53.000000000 +0200 @@ -5,10 +5,12 @@ README.rst changelog markup2html.py +setup.cfg setup.py Markups.egg-info/PKG-INFO Markups.egg-info/SOURCES.txt Markups.egg-info/dependency_links.txt +Markups.egg-info/entry_points.txt Markups.egg-info/requires.txt Markups.egg-info/top_level.txt docs/changelog.rst @@ -22,7 +24,6 @@ markups/abstract.py markups/common.py markups/markdown.py -markups/mdx_mathjax.py markups/restructuredtext.py markups/textile.py tests/__init__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/Markups.egg-info/entry_points.txt new/Markups-3.0.0/Markups.egg-info/entry_points.txt --- old/Markups-2.0.1/Markups.egg-info/entry_points.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/Markups-3.0.0/Markups.egg-info/entry_points.txt 2018-05-03 17:12:53.000000000 +0200 @@ -0,0 +1,5 @@ +[pymarkups] +markdown = markups.markdown:MarkdownMarkup +restructuredtext = markups.restructuredtext:ReStructuredTextMarkup +textile = markups.textile:TextileMarkup + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/Markups.egg-info/requires.txt new/Markups-3.0.0/Markups.egg-info/requires.txt --- old/Markups-2.0.1/Markups.egg-info/requires.txt 2017-06-24 21:49:03.000000000 +0200 +++ new/Markups-3.0.0/Markups.egg-info/requires.txt 2018-05-03 17:12:53.000000000 +0200 @@ -1,3 +1,4 @@ +python-markdown-math [Markdown] Markdown>=2.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/PKG-INFO new/Markups-3.0.0/PKG-INFO --- old/Markups-2.0.1/PKG-INFO 2017-06-24 21:49:04.000000000 +0200 +++ new/Markups-3.0.0/PKG-INFO 2018-05-03 17:12:53.000000000 +0200 @@ -1,6 +1,6 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: Markups -Version: 2.0.1 +Version: 3.0.0 Summary: A wrapper around various text markups Home-page: https://github.com/retext-project/pymarkups Author: Dmitry Shachnev @@ -10,6 +10,12 @@ .. image:: https://api.travis-ci.org/retext-project/pymarkups.svg :target: https://travis-ci.org/retext-project/pymarkups :alt: Travis CI status + .. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg + :target: https://codecov.io/gh/retext-project/pymarkups + :alt: Coverage status + .. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest + :target: https://pymarkups.readthedocs.io/en/latest/ + :alt: ReadTheDocs status This module provides a wrapper around various text markup languages. @@ -48,7 +54,7 @@ The release version can be downloaded from PyPI_. The source code is hosted on GitHub_. - .. _PyPI: https://pypi.python.org/pypi/Markups + .. _PyPI: https://pypi.org/project/Markups/ .. _GitHub: https://github.com/retext-project/pymarkups The documentation is available online_ or can be generated from source by @@ -56,7 +62,7 @@ python3 setup.py build_sphinx - .. _online: https://pythonhosted.org/Markups/ + .. _online: https://pymarkups.readthedocs.io/en/latest/ .. _Sphinx: http://www.sphinx-doc.org/en/stable/ Platform: UNKNOWN @@ -67,7 +73,6 @@ Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 @@ -75,3 +80,7 @@ Classifier: Topic :: Text Processing :: Markup Classifier: Topic :: Text Processing :: General Classifier: Topic :: Software Development :: Libraries :: Python Modules +Provides-Extra: Markdown +Provides-Extra: Textile +Provides-Extra: highlighting +Provides-Extra: reStructuredText diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/README.rst new/Markups-3.0.0/README.rst --- old/Markups-2.0.1/README.rst 2017-06-12 21:51:11.000000000 +0200 +++ new/Markups-3.0.0/README.rst 2018-05-03 16:39:55.000000000 +0200 @@ -1,6 +1,12 @@ .. image:: https://api.travis-ci.org/retext-project/pymarkups.svg :target: https://travis-ci.org/retext-project/pymarkups :alt: Travis CI status +.. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg + :target: https://codecov.io/gh/retext-project/pymarkups + :alt: Coverage status +.. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest + :target: https://pymarkups.readthedocs.io/en/latest/ + :alt: ReadTheDocs status This module provides a wrapper around various text markup languages. @@ -39,7 +45,7 @@ The release version can be downloaded from PyPI_. The source code is hosted on GitHub_. -.. _PyPI: https://pypi.python.org/pypi/Markups +.. _PyPI: https://pypi.org/project/Markups/ .. _GitHub: https://github.com/retext-project/pymarkups The documentation is available online_ or can be generated from source by @@ -47,5 +53,5 @@ python3 setup.py build_sphinx -.. _online: https://pythonhosted.org/Markups/ +.. _online: https://pymarkups.readthedocs.io/en/latest/ .. _Sphinx: http://www.sphinx-doc.org/en/stable/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/changelog new/Markups-3.0.0/changelog --- old/Markups-2.0.1/changelog 2017-06-24 21:43:28.000000000 +0200 +++ new/Markups-3.0.0/changelog 2018-05-03 17:09:46.000000000 +0200 @@ -1,3 +1,21 @@ +Version 3.0.0, 2018-05-03 +========================= + +Incompatible changes: + +* The deprecated AbstractMarkup API has been removed. +* Python 3.2 is no longer supported. +* The output now uses HTML5 instead of HTML4. +* The custom markups are now registered with entry points. +* The ``get_custom_markups()`` method has been removed. +* New required dependency: python-markdown-math_. + +Other changes: + +* The upcoming Python-Markdown 3.x release is now supported. + +.. _python-markdown-math: https://pypi.org/project/python-markdown-math/ + Version 2.0.1, 2017-06-24 ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/docs/conf.py new/Markups-3.0.0/docs/conf.py --- old/Markups-2.0.1/docs/conf.py 2017-06-12 21:56:15.000000000 +0200 +++ new/Markups-3.0.0/docs/conf.py 2018-05-03 16:47:18.000000000 +0200 @@ -28,7 +28,7 @@ # General information about the project. project = u'Python-Markups' -copyright = u'2017, Dmitry Shachnev' +copyright = u'2018, Dmitry Shachnev' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/docs/custom_markups.rst new/Markups-3.0.0/docs/custom_markups.rst --- old/Markups-2.0.1/docs/custom_markups.rst 2016-02-26 18:10:31.000000000 +0100 +++ new/Markups-3.0.0/docs/custom_markups.rst 2018-05-03 13:32:45.000000000 +0200 @@ -7,20 +7,36 @@ A third-party markup is a Python module that can be installed the usual way. -Every module should have :data:`markup` property pointing to -the markup class. -To register the markup, one should append the full module name to -file named ``pymarkups.txt`` in the -:ref:`configuration directory <configuration-directory>`. +To register your markup class with PyMarkups, make it inherit from +:class:`~markups.abstract.AbstractMarkup`, and add that class to +your module's ``entry_points``, in the “pymarkups” entry point group. + +For example: + +.. code-block:: python + + setup( + ... + entry_points={ + 'pymarkups': [ + 'mymarkup = mymodule:MyMarkupClass', + ], + }, + ... + ) + +See the `setuptools documentation`_ on entry points for details. To check if the module was found by Python-Markups, one can check if the module is present in return value of -:func:`~markups.get_custom_markups` function. +:func:`~markups.get_all_markups` function. + +.. versionchanged:: 3.0 + The custom markups should be registered using the entry points + mechanism, the ``pymarkups.txt`` file is no longer supported. -.. versionchanged:: 0.6 - The third-party markup is now a normal Python module, not - necessarily a file in ``markups`` namespace. +.. _`setuptools documentation`: https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins Importing third-party modules ============================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/docs/index.rst new/Markups-3.0.0/docs/index.rst --- old/Markups-2.0.1/docs/index.rst 2015-09-13 19:56:17.000000000 +0200 +++ new/Markups-3.0.0/docs/index.rst 2018-05-02 23:09:24.000000000 +0200 @@ -35,5 +35,5 @@ * It is also packaged in Debian_. .. _GitHub: https://github.com/retext-project/pymarkups -.. _PyPI: https://pypi.python.org/pypi/Markups +.. _PyPI: https://pypi.org/project/Markups/ .. _Debian: https://packages.debian.org/sid/source/pymarkups diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/docs/overview.rst new/Markups-3.0.0/docs/overview.rst --- old/Markups-2.0.1/docs/overview.rst 2016-05-09 19:30:38.000000000 +0200 +++ new/Markups-3.0.0/docs/overview.rst 2018-05-03 13:18:00.000000000 +0200 @@ -19,7 +19,6 @@ .. autofunction:: markups.get_all_markups .. autofunction:: markups.get_available_markups -.. autofunction:: markups.get_custom_markups Getting a specific markup ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/docs/standard_markups.rst new/Markups-3.0.0/docs/standard_markups.rst --- old/Markups-2.0.1/docs/standard_markups.rst 2017-06-12 21:51:23.000000000 +0200 +++ new/Markups-3.0.0/docs/standard_markups.rst 2018-05-03 16:37:10.000000000 +0200 @@ -24,7 +24,7 @@ * Finally, one can programmatically pass list of extension names to :class:`markups.MarkdownMarkup` constructor. -Additionally to features provided by Python-Markdown, this markup also +The `Math Markdown extension`_ is enabled by default. This extension supports a syntax for LaTeX-style math formulas (powered by MathJax_). The delimiters are: @@ -35,8 +35,8 @@ ``\(...\)`` ``\[...\]`` ================ =============== -.. [#f1] To enable single-dollar-sign delimiter, one should enable - virtual ``mathjax`` extension. +.. [#f1] To enable single-dollar-sign delimiter, one should add + ``mdx_math(enable_dollar_delimiter=1)`` to the extensions list. The `Python-Markdown Extra`_ set of extensions is enabled by default. To disable it, one can enable virtual ``remove_extra`` extension @@ -47,10 +47,11 @@ supported as well. .. _Markdown: https://daringfireball.net/projects/markdown/ -.. _Python-Markdown: https://pythonhosted.org/Markdown/ +.. _Python-Markdown: https://python-markdown.github.io/ .. _MathJax: https://www.mathjax.org/ -.. _`Python-Markdown extensions`: http://pythonhosted.org/Markdown/extensions/ -.. _`Python-Markdown Extra`: http://pythonhosted.org/Markdown/extensions/extra.html +.. _`Python-Markdown extensions`: https://python-markdown.github.io/extensions/ +.. _`Math Markdown extension`: https://github.com/mitya57/python-markdown-math +.. _`Python-Markdown Extra`: https://python-markdown.github.io/extensions/extra/ .. autoclass:: markups.MarkdownMarkup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/__init__.py new/Markups-3.0.0/markups/__init__.py --- old/Markups-2.0.1/markups/__init__.py 2017-06-24 21:43:39.000000000 +0200 +++ new/Markups-3.0.0/markups/__init__.py 2018-05-03 16:48:37.000000000 +0200 @@ -1,49 +1,26 @@ # This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2015 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 -import importlib -import os -import warnings -from markups.common import CONFIGURATION_DIR +import pkg_resources from markups.markdown import MarkdownMarkup from markups.restructuredtext import ReStructuredTextMarkup from markups.textile import TextileMarkup -__version_tuple__ = (2, 0, 1) +__version_tuple__ = (3, 0, 0) __version__ = '.'.join(map(str, __version_tuple__)) builtin_markups = [MarkdownMarkup, ReStructuredTextMarkup, TextileMarkup] # Public API -def get_custom_markups(): - """ - :returns: list of registered :doc:`custom markups <custom_markups>` - :rtype: list of markup classes - """ - try: - list_file = open(os.path.join(CONFIGURATION_DIR, 'pymarkups.txt')) - except IOError: - return [] - else: - custom_markups_names = [line.rstrip() for line in list_file] - custom_markups = [] - for markup_name in custom_markups_names: - try: - module = importlib.import_module(markup_name) - custom_markups.append(module.markup) - except (ImportError, AttributeError): - warnings.warn('Warning: cannot import module %r.' % - markup_name, ImportWarning) - return custom_markups - def get_all_markups(): """ :returns: list of all markups (both standard and custom ones) :rtype: list of markup classes """ - return builtin_markups + get_custom_markups() + entry_points = pkg_resources.iter_entry_points("pymarkups") + return [entry_point.load() for entry_point in entry_points] def get_available_markups(): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/abstract.py new/Markups-3.0.0/markups/abstract.py --- old/Markups-2.0.1/markups/abstract.py 2017-06-12 21:54:30.000000000 +0200 +++ new/Markups-3.0.0/markups/abstract.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,19 +1,21 @@ # vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2016 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 -from functools import wraps -from warnings import warn +whole_html_template = u"""<!doctype html> +<html> +<head> +<meta http-equiv="content-type" content="text/html; charset=utf-8"> +{custom_headers}<title>{title}</title> +{stylesheet}{javascript}</head> +<body> +{body} +</body> +</html> +""" -def _deprecated(function_in): - @wraps(function_in) - def function_out(*args, **kwargs): - warn('Method %s() is deprecated. Please use convert() instead.' % - function_in.__name__, DeprecationWarning, stacklevel=2) - return function_in(*args, **kwargs) - return function_out class AbstractMarkup(object): """Abstract class for markup languages. @@ -53,26 +55,6 @@ """ raise NotImplementedError - @_deprecated - def get_document_title(self, text): - return self.convert(text).get_document_title() - - @_deprecated - def get_document_body(self, text): - return self.convert(text).get_document_body() - - @_deprecated - def get_stylesheet(self, text=''): - return self.convert(text).get_stylesheet() - - @_deprecated - def get_javascript(self, text='', **kwargs): - return self.convert(text).get_javascript(**kwargs) - - @_deprecated - def get_whole_html(self, text, **kwargs): - return self.convert(text).get_whole_html(**kwargs) - class ConvertedMarkup(object): """This class encapsulates the title, body, stylesheet and javascript @@ -137,18 +119,14 @@ :param bool webenv: like in :meth:`~.ConvertedMarkup.get_javascript` above """ - body = self.get_document_body() stylesheet = ('<style type="text/css">\n' + self.get_stylesheet() + '</style>\n' if include_stylesheet else '') - title = self.get_document_title() - if not title: - title = fallback_title - title_string = ('<title>' + title + '</title>\n') if title else '' - javascript = self.get_javascript(webenv) - return ( - '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n' - '<html>\n<head>\n' - '<meta http-equiv="content-type" content="text/html; charset=utf-8">\n' - + custom_headers + title_string + stylesheet + javascript - + '</head>\n<body>\n' + body + '</body>\n</html>\n' - ) + + context = { + "body": self.get_document_body(), + "title": self.get_document_title() or fallback_title, + "javascript": self.get_javascript(webenv), + "stylesheet": stylesheet, + "custom_headers": custom_headers, + } + return whole_html_template.format(**context) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/common.py new/Markups-3.0.0/markups/common.py --- old/Markups-2.0.1/markups/common.py 2017-06-12 22:12:17.000000000 +0200 +++ new/Markups-3.0.0/markups/common.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,6 +1,6 @@ # This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2017 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 import os.path @@ -9,7 +9,7 @@ CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.expanduser('~/.config')) MATHJAX_LOCAL_URL = 'file:///usr/share/javascript/mathjax/MathJax.js' -MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js' +MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js' PYGMENTS_STYLE = 'default' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/markdown.py new/Markups-3.0.0/markups/markdown.py --- old/Markups-2.0.1/markups/markdown.py 2017-06-12 21:54:52.000000000 +0200 +++ new/Markups-3.0.0/markups/markdown.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,8 +1,8 @@ # vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2017 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 from __future__ import absolute_import @@ -17,7 +17,7 @@ '''<script type="text/x-mathjax-config"> MathJax.Hub.Config({ config: ["MMLorHTML.js"], - jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"], + jax: ["input/TeX", "input/AsciiMath", "output/HTML-CSS", "output/NativeMML"], extensions: ["MathMenu.js", "MathZoom.js"], TeX: { extensions: ["AMSmath.js", "AMSsymbols.js"], @@ -42,7 +42,7 @@ name = 'Markdown' attributes = { common.LANGUAGE_HOME_PAGE: 'https://daringfireball.net/projects/markdown/', - common.MODULE_HOME_PAGE: 'https://github.com/waylan/Python-Markdown', + common.MODULE_HOME_PAGE: 'https://github.com/Python-Markdown/markdown', common.SYNTAX_DOCUMENTATION: 'https://daringfireball.net/projects/markdown/syntax' } @@ -55,7 +55,8 @@ import markdown except ImportError: return False - return hasattr(markdown, 'version_info') and markdown.version_info >= (2, 6) + return (hasattr(markdown, '__version_info__') or # underscored attribute means 3.x + hasattr(markdown, 'version_info') and markdown.version_info >= (2, 6)) def _load_extensions_list_from_file(self, filename): try: @@ -84,11 +85,6 @@ return [] def _canonicalize_extension_name(self, extension_name): - lb = extension_name.find('(') - if lb >= 0: - extension_name, parameters = extension_name[:lb], extension_name[lb:] - else: - parameters = '' prefixes = ('markdown.extensions.', '', 'mdx_') for prefix in prefixes: try: @@ -98,39 +94,47 @@ except (ImportError, ValueError, TypeError): pass else: - return prefix + extension_name + parameters + return prefix + extension_name + + def _split_extension_config(self, extension_name): + """Splits the configuration options from the extension name.""" + lb = extension_name.find('(') + if lb == -1: + return extension_name, {} + extension_name, parameters = extension_name[:lb], extension_name[lb + 1:-1] + pairs = [x.split("=") for x in parameters.split(",")] + return extension_name, {x.strip(): y.strip() for (x, y) in pairs} def _apply_extensions(self): extensions = (self.requested_extensions + self.global_extensions + self.document_extensions) - extensions_final = [] - should_push_extra = True - should_push_mathjax = (True, False) + extension_names = {"markdown.extensions.extra", "mdx_math"} + extension_configs = {} + for extension in extensions: if extension == 'mathjax': - should_push_mathjax = (True, True) + mathjax_config = {"enable_dollar_delimiter": True} + extension_configs["mdx_math"] = mathjax_config elif extension == 'remove_extra': - should_push_extra = False - should_push_mathjax = (False, ) + extension_names.remove("markdown.extensions.extra") + extension_names.remove("mdx_math") else: - if extension in _canonicalized_ext_names: - canonical_name = _canonicalized_ext_names[extension] + name, config = self._split_extension_config(extension) + if name in _canonicalized_ext_names: + canonical_name = _canonicalized_ext_names[name] else: - canonical_name = self._canonicalize_extension_name(extension) + canonical_name = self._canonicalize_extension_name(name) if canonical_name is None: warnings.warn('Extension "%s" does not exist.' % extension, ImportWarning) continue - _canonicalized_ext_names[extension] = canonical_name - if canonical_name not in extensions_final: - extensions_final.append(canonical_name) - if should_push_extra: - extensions_final.append('markdown.extensions.extra') - if should_push_mathjax[0]: - extensions_final.append('markups.mdx_mathjax(enable_dollar_delimiter=%r)' % - should_push_mathjax[1]) - self.md = self.markdown.Markdown(extensions=extensions_final, output_format='html4') - self.extensions = extensions_final + _canonicalized_ext_names[name] = canonical_name + extension_names.add(canonical_name) + extension_configs[canonical_name] = config + self.md = self.markdown.Markdown(extensions=list(extension_names), + extension_configs=extension_configs, + output_format='html5') + self.extensions = extension_names def __init__(self, filename=None, extensions=None): AbstractMarkup.__init__(self, filename) @@ -142,7 +146,6 @@ else: self.global_extensions = [] self.document_extensions = [] - _canonicalized_ext_names = {} self._apply_extensions() def convert(self, text): @@ -170,7 +173,7 @@ class ConvertedMarkdown(ConvertedMarkup): def get_javascript(self, webenv=False): - if '<script type="math/tex' in self.body: + if '<script type="math/' in self.body: javascript = (MATHJAX_CONFIG + '<script type="text/javascript" src="' + common.get_mathjax_url(webenv) + '"></script>') else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/mdx_mathjax.py new/Markups-3.0.0/markups/mdx_mathjax.py --- old/Markups-2.0.1/markups/mdx_mathjax.py 2015-12-13 19:48:30.000000000 +0100 +++ new/Markups-3.0.0/markups/mdx_mathjax.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,62 +0,0 @@ -# This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2015 - -# Maintained in https://github.com/mitya57/python-markdown-math - -''' -Math extension for Python-Markdown -================================== - -Adds support for displaying math formulas using [MathJax](http://www.mathjax.org/). - -Author: 2015, Dmitry Shachnev <[email protected]>. -''' - -from __future__ import absolute_import - -import markdown - -class MathExtension(markdown.extensions.Extension): - def __init__(self, *args, **kwargs): - self.config = { - 'enable_dollar_delimiter': [False, 'Enable single-dollar delimiter'], - } - super(MathExtension, self).__init__(*args, **kwargs) - - def extendMarkdown(self, md, md_globals): - def handle_match_inline(m): - node = markdown.util.etree.Element('script') - node.set('type', 'math/tex') - node.text = markdown.util.AtomicString(m.group(3)) - return node - - def handle_match(m): - node = markdown.util.etree.Element('script') - node.set('type', 'math/tex; mode=display') - if '\\begin' in m.group(2): - node.text = markdown.util.AtomicString(m.group(2) + m.group(4) + m.group(5)) - else: - node.text = markdown.util.AtomicString(m.group(3)) - return node - - inlinemathpatterns = ( - markdown.inlinepatterns.Pattern(r'(?<!\\|\$)(\$)([^\$]+)(\$)'), # $...$ - markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\()(.+?)(\\\))') # \(...\) - ) - mathpatterns = ( - markdown.inlinepatterns.Pattern(r'(?<!\\)(\$\$)([^\$]+)(\$\$)'), # $$...$$ - markdown.inlinepatterns.Pattern(r'(?<!\\)(\\\[)(.+?)(\\\])'), # \[...\] - markdown.inlinepatterns.Pattern(r'(?<!\\)(\\begin{([a-z]+?\*?)})(.+?)(\\end{\3})') - ) - if not self.getConfig('enable_dollar_delimiter'): - inlinemathpatterns = inlinemathpatterns[1:] - for i, pattern in enumerate(inlinemathpatterns): - pattern.handleMatch = handle_match_inline - md.inlinePatterns.add('math-inline-%d' % i, pattern, '<escape') - for i, pattern in enumerate(mathpatterns): - pattern.handleMatch = handle_match - md.inlinePatterns.add('math-%d' % i, pattern, '<escape') - -def makeExtension(*args, **kwargs): - return MathExtension(*args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/restructuredtext.py new/Markups-3.0.0/markups/restructuredtext.py --- old/Markups-2.0.1/markups/restructuredtext.py 2017-06-24 21:39:46.000000000 +0200 +++ new/Markups-3.0.0/markups/restructuredtext.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,8 +1,8 @@ # vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2017 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 import markups.common as common from markups.abstract import AbstractMarkup, ConvertedMarkup @@ -48,7 +48,7 @@ def convert(self, text): parts = self._publish_parts(text, source_path=self.filename, - writer_name='html', settings_overrides=self.overrides) + writer_name='html5', settings_overrides=self.overrides) # Determine head head = parts['head'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/markups/textile.py new/Markups-3.0.0/markups/textile.py --- old/Markups-2.0.1/markups/textile.py 2017-06-12 21:55:25.000000000 +0200 +++ new/Markups-3.0.0/markups/textile.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,8 +1,8 @@ # vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2013-2016 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2013-2017 from __future__ import absolute_import diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/setup.cfg new/Markups-3.0.0/setup.cfg --- old/Markups-2.0.1/setup.cfg 2017-06-24 21:49:04.000000000 +0200 +++ new/Markups-3.0.0/setup.cfg 2018-05-03 17:12:53.000000000 +0200 @@ -1,3 +1,6 @@ +[bdist_wheel] +universal = 1 + [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/setup.py new/Markups-3.0.0/setup.py --- old/Markups-2.0.1/setup.py 2017-05-29 15:58:09.000000000 +0200 +++ new/Markups-3.0.0/setup.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,10 +1,6 @@ #!/usr/bin/env python3 -import sys -try: - from setuptools import setup, Command -except ImportError: - from distutils.core import setup, Command +from setuptools import setup from markups import __version__ as version from os.path import dirname, join @@ -19,7 +15,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', @@ -29,22 +24,6 @@ 'Topic :: Software Development :: Libraries :: Python Modules' ] -class run_tests(Command): - user_options = [] - - def initialize_options(self): pass - def finalize_options(self): pass - - def run(self): - from unittest.main import main - testprogram = main(module=None, argv=sys.argv[:1], verbosity=2, exit=False) - if not testprogram.result.wasSuccessful(): - sys.exit(1) - -cmdclass = {} -if sys.version_info[0] >= 3: - cmdclass['test'] = run_tests - setup_args = { 'name': 'Markups', 'version': version, @@ -54,14 +33,21 @@ 'author_email': '[email protected]', 'url': 'https://github.com/retext-project/pymarkups', 'packages': ['markups'], + 'install_requires': 'python-markdown-math', 'extras_require': { 'Markdown': ['Markdown>=2.6'], 'reStructuredText': ['docutils'], 'Textile': ['textile'], 'highlighting': ['Pygments'], }, + 'entry_points': { + 'pymarkups': [ + 'markdown = markups.markdown:MarkdownMarkup', + 'restructuredtext = markups.restructuredtext:ReStructuredTextMarkup', + 'textile = markups.textile:TextileMarkup', + ], + }, 'license': 'BSD', - 'cmdclass': cmdclass, 'classifiers': classifiers } setup(**setup_args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/tests/__init__.py new/Markups-3.0.0/tests/__init__.py --- old/Markups-2.0.1/tests/__init__.py 2015-08-07 20:37:13.000000000 +0200 +++ new/Markups-3.0.0/tests/__init__.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,4 +0,0 @@ -from unittest.main import main - -if __name__ == '__main__': - main(module=None, verbosity=2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/tests/test_markdown.py new/Markups-3.0.0/tests/test_markdown.py --- old/Markups-2.0.1/tests/test_markdown.py 2017-06-12 21:55:42.000000000 +0200 +++ new/Markups-3.0.0/tests/test_markdown.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,10 +1,12 @@ # vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups test suite -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2016 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 from markups.markdown import MarkdownMarkup, _canonicalized_ext_names +from os import remove +from tempfile import NamedTemporaryFile import unittest import warnings @@ -74,7 +76,7 @@ mathjax_output = \ r'''<p> -<script type="math/tex">i_1</script> some text \$escaped\$ <script type="math/tex">i_2</script> +<script type="math/tex">i_1</script> some text $escaped$ <script type="math/tex">i_2</script> </p> <p> <script type="math/tex">\LaTeX</script> \(escaped)</p> @@ -90,7 +92,7 @@ <p> <script type="math/tex; mode=display"> \alpha </script> text <script type="math/tex; mode=display"> \beta </script> </p> -<p>\$$escaped\$$ \[escaped]</p> +<p>$$escaped$$ \[escaped]</p> ''' mathjax_multiline_source = \ @@ -148,8 +150,9 @@ self.assertIsNone(markup._canonicalize_extension_name('nonexistent(someoption)')) self.assertIsNone(markup._canonicalize_extension_name('.foobar')) self.assertEqual(markup._canonicalize_extension_name('meta'), 'markdown.extensions.meta') - self.assertEqual(markup._canonicalize_extension_name('meta(someoption)'), - 'markdown.extensions.meta(someoption)') + name, parameters = markup._split_extension_config('toc(anchorlink=1, foo=bar)') + self.assertEqual(name, 'toc') + self.assertEqual(parameters, {'anchorlink': '1', 'foo': 'bar'}) def test_loading_extensions_by_module_name(self): markup = MarkdownMarkup(extensions=['markdown.extensions.footnotes']) @@ -169,8 +172,7 @@ html = markup.convert('## Header').get_document_body() self.assertEqual(html, '<h2 id="header"><a class="toclink" href="#header">Header</a></h2>\n') - self.assertEqual(_canonicalized_ext_names['toc(anchorlink=1)'], - 'markdown.extensions.toc(anchorlink=1)') + self.assertEqual(_canonicalized_ext_names['toc'], 'markdown.extensions.toc') def test_document_extensions_parameters(self): markup = MarkdownMarkup(extensions=[]) @@ -251,11 +253,24 @@ body = markup.convert(mathjax_multilevel_source).get_document_body() self.assertEqual(mathjax_multilevel_output, body) + def test_mathjax_asciimath(self): + markup = MarkdownMarkup(extensions=['mdx_math(use_asciimath=1)']) + converted = markup.convert('\( [[a,b],[c,d]] \)') + body = converted.get_document_body() + self.assertIn('<script type="math/asciimath">', body) + self.assertIn('<script type="text/javascript"', converted.get_javascript()) + @unittest.skipUnless(hasattr(unittest.TestCase, 'assertWarnsRegex'), 'assertWarnsRegex is not supported') def test_not_loading_sys(self): with self.assertWarnsRegex(ImportWarning, 'Extension "sys" does not exist.'): markup = MarkdownMarkup(extensions=['sys']) self.assertNotIn('sys', markup.extensions) -if __name__ == '__main__': - unittest.main() + def test_extensions_file(self): + f = NamedTemporaryFile(mode="w", delete=False) + f.write("foo\n# bar\nbaz\n") + f.close() + markup = MarkdownMarkup() + extensions = markup._load_extensions_list_from_file(f.name) + self.assertEqual(extensions, ["foo", "baz"]) + remove(f.name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/tests/test_public_api.py new/Markups-3.0.0/tests/test_public_api.py --- old/Markups-2.0.1/tests/test_public_api.py 2015-12-13 13:55:02.000000000 +0100 +++ new/Markups-3.0.0/tests/test_public_api.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,8 +1,9 @@ # This file is part of python-markups test suite -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2015 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 import markups +from markups.common import get_pygments_stylesheet import unittest class APITest(unittest.TestCase): @@ -20,5 +21,18 @@ markup = markups.get_markup_for_file_name('myfile.mkd') self.assertIsInstance(markup, markups.MarkdownMarkup) -if __name__ == '__main__': - unittest.main() + @unittest.skipUnless(markups.MarkdownMarkup.available(), 'Markdown not available') + def test_available_markups(self): + available_markups = markups.get_available_markups() + self.assertIn(markups.MarkdownMarkup, available_markups) + + def test_get_pygments_stylesheet(self): + try: + import pygments.formatters + except ImportError: + raise unittest.SkipTest("Pygments not available") + stylesheet = get_pygments_stylesheet(".selector") + self.assertIn(".selector .ch { color: #408080", stylesheet) + stylesheet = get_pygments_stylesheet(".selector", style="colorful") + self.assertIn(".selector .ch { color: #888888", stylesheet) + self.assertFalse(get_pygments_stylesheet(".selector", style="")) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/tests/test_restructuredtext.py new/Markups-3.0.0/tests/test_restructuredtext.py --- old/Markups-2.0.1/tests/test_restructuredtext.py 2017-06-24 21:44:42.000000000 +0200 +++ new/Markups-3.0.0/tests/test_restructuredtext.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,8 +1,8 @@ # vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups test suite -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2012-2017 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2012-2018 import unittest from markups import ReStructuredTextMarkup @@ -26,7 +26,7 @@ stylesheet = converted.get_stylesheet() text_expected = ('<div class="document" id="hello-world">\n' '<h1 class="title">Hello, world!</h1>\n' - '<h2 class="subtitle" id="some-subtitle">Some subtitle</h2>\n' + '<p class="subtitle" id="some-subtitle">Some subtitle</p>\n' '<p>This is an example <strong>reStructuredText</strong> document.</p>\n' '</div>\n') title_expected = 'Hello, world!' @@ -56,5 +56,11 @@ body = markup.convert('`').get_document_body() # unclosed role self.assertNotIn('system-message', body) -if __name__ == '__main__': - unittest.main() + def test_whole_html(self): + markup = ReStructuredTextMarkup() + text = basic_text + "\n\n.. math::\n \sin \varphi" + html = markup.convert(text).get_whole_html() + self.assertIn("<title>Hello, world!</title>", html) + self.assertIn('<style type="text/css">', html) + self.assertIn('<script type="text/javascript"', html) + self.assertIn('This is an example', html) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markups-2.0.1/tests/test_textile.py new/Markups-3.0.0/tests/test_textile.py --- old/Markups-2.0.1/tests/test_textile.py 2016-02-26 18:10:31.000000000 +0100 +++ new/Markups-3.0.0/tests/test_textile.py 2018-05-03 16:47:18.000000000 +0200 @@ -1,6 +1,6 @@ # This file is part of python-markups test suite -# License: BSD -# Copyright: (C) Dmitry Shachnev, 2013 +# License: 3-clause BSD, see LICENSE file +# Copyright: (C) Dmitry Shachnev, 2013-2018 from markups import TextileMarkup import unittest @@ -11,6 +11,3 @@ markup = TextileMarkup() html = markup.convert('Hello, **world**!').get_document_body() self.assertEqual(html, '\t<p>Hello, <b>world</b>!</p>') - -if __name__ == '__main__': - unittest.main()
