[Python-modules-commits] [pymarkups] 01/01: Import pymarkups_2.0.1.orig.tar.gz
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Thu Jun 29 13:05:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
mitya57 pushed a commit to branch upstream
in repository pymarkups.
commit 44d9d5fb924cde166d37ae1a15f62e171526eae8
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Thu Jun 29 16:04:34 2017 +0300
Import pymarkups_2.0.1.orig.tar.gz
---
.travis.yml | 1 +
Markups.egg-info/PKG-INFO | 5 +++--
Markups.egg-info/SOURCES.txt | 1 +
Markups.egg-info/requires.txt | 12 ++++++++++++
PKG-INFO | 5 +++--
README.rst | 2 +-
changelog | 7 +++++++
docs/conf.py | 2 +-
docs/standard_markups.rst | 2 +-
markups/__init__.py | 2 +-
markups/abstract.py | 2 +-
markups/common.py | 4 ++--
markups/markdown.py | 9 +++++----
markups/restructuredtext.py | 22 ++++++++++------------
markups/textile.py | 2 +-
setup.cfg | 1 -
setup.py | 7 +++++++
tests/test_markdown.py | 2 +-
tests/test_restructuredtext.py | 2 +-
19 files changed, 59 insertions(+), 31 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 2c72e09..772b6a1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,7 @@ python:
- "3.3"
- "3.4"
- "3.5"
+ - "3.6"
- "pypy"
- "pypy3"
install: pip install Markdown docutils textile
diff --git a/Markups.egg-info/PKG-INFO b/Markups.egg-info/PKG-INFO
index 55b0ba8..b8ad064 100644
--- a/Markups.egg-info/PKG-INFO
+++ b/Markups.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Markups
-Version: 2.0.0
+Version: 2.0.1
Summary: A wrapper around various text markups
Home-page: https://github.com/retext-project/pymarkups
Author: Dmitry Shachnev
@@ -41,7 +41,7 @@ Description:
<p>This is an example <strong>reStructuredText</strong> document.</p>
</div>
- .. _Markdown: http://daringfireball.net/projects/markdown/
+ .. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
@@ -71,6 +71,7 @@ Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/Markups.egg-info/SOURCES.txt b/Markups.egg-info/SOURCES.txt
index 9132b9b..0eabeb7 100644
--- a/Markups.egg-info/SOURCES.txt
+++ b/Markups.egg-info/SOURCES.txt
@@ -9,6 +9,7 @@ setup.py
Markups.egg-info/PKG-INFO
Markups.egg-info/SOURCES.txt
Markups.egg-info/dependency_links.txt
+Markups.egg-info/requires.txt
Markups.egg-info/top_level.txt
docs/changelog.rst
docs/conf.py
diff --git a/Markups.egg-info/requires.txt b/Markups.egg-info/requires.txt
new file mode 100644
index 0000000..cf19c1a
--- /dev/null
+++ b/Markups.egg-info/requires.txt
@@ -0,0 +1,12 @@
+
+[Markdown]
+Markdown>=2.6
+
+[Textile]
+textile
+
+[highlighting]
+Pygments
+
+[reStructuredText]
+docutils
diff --git a/PKG-INFO b/PKG-INFO
index 55b0ba8..b8ad064 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: Markups
-Version: 2.0.0
+Version: 2.0.1
Summary: A wrapper around various text markups
Home-page: https://github.com/retext-project/pymarkups
Author: Dmitry Shachnev
@@ -41,7 +41,7 @@ Description:
<p>This is an example <strong>reStructuredText</strong> document.</p>
</div>
- .. _Markdown: http://daringfireball.net/projects/markdown/
+ .. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
@@ -71,6 +71,7 @@ Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: General
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/README.rst b/README.rst
index 9f14081..518e6c1 100644
--- a/README.rst
+++ b/README.rst
@@ -32,7 +32,7 @@ Usage example:
<p>This is an example <strong>reStructuredText</strong> document.</p>
</div>
-.. _Markdown: http://daringfireball.net/projects/markdown/
+.. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
diff --git a/changelog b/changelog
index ebee1d9..d564d5e 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+Version 2.0.1, 2017-06-24
+=========================
+
+* The new MathJax CDN is used, the old one will be shut down soon.
+* When using MathJax with Markdown, the AMSmath and AMSsymbols extensions are
+ now enabled.
+
Version 2.0.0, 2016-05-09
=========================
diff --git a/docs/conf.py b/docs/conf.py
index f52be3b..f1ff9bc 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -28,7 +28,7 @@ master_doc = 'index'
# General information about the project.
project = u'Python-Markups'
-copyright = u'2015, Dmitry Shachnev'
+copyright = u'2017, 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 --git a/docs/standard_markups.rst b/docs/standard_markups.rst
index 1a60b39..dcfe7f2 100644
--- a/docs/standard_markups.rst
+++ b/docs/standard_markups.rst
@@ -46,7 +46,7 @@ The default file extension associated with Markdown markup is ``.mkd``,
though many other extensions (including ``.md`` and ``.markdown``) are
supported as well.
-.. _Markdown: http://daringfireball.net/projects/markdown/
+.. _Markdown: https://daringfireball.net/projects/markdown/
.. _Python-Markdown: https://pythonhosted.org/Markdown/
.. _MathJax: https://www.mathjax.org/
.. _`Python-Markdown extensions`: http://pythonhosted.org/Markdown/extensions/
diff --git a/markups/__init__.py b/markups/__init__.py
index 26e53f8..72b24f2 100644
--- a/markups/__init__.py
+++ b/markups/__init__.py
@@ -10,7 +10,7 @@ from markups.markdown import MarkdownMarkup
from markups.restructuredtext import ReStructuredTextMarkup
from markups.textile import TextileMarkup
-__version_tuple__ = (2, 0, 0)
+__version_tuple__ = (2, 0, 1)
__version__ = '.'.join(map(str, __version_tuple__))
builtin_markups = [MarkdownMarkup, ReStructuredTextMarkup, TextileMarkup]
diff --git a/markups/abstract.py b/markups/abstract.py
index 87da48c..fc2426d 100644
--- a/markups/abstract.py
+++ b/markups/abstract.py
@@ -2,7 +2,7 @@
# This file is part of python-markups module
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2014
+# Copyright: (C) Dmitry Shachnev, 2012-2016
from functools import wraps
from warnings import warn
diff --git a/markups/common.py b/markups/common.py
index e1f789d..eed1535 100644
--- a/markups/common.py
+++ b/markups/common.py
@@ -1,6 +1,6 @@
# This file is part of python-markups module
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2015
+# Copyright: (C) Dmitry Shachnev, 2012-2017
import os.path
@@ -9,7 +9,7 @@ import os.path
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://cdn.mathjax.org/mathjax/latest/MathJax.js'
+MATHJAX_WEB_URL = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js'
PYGMENTS_STYLE = 'default'
diff --git a/markups/markdown.py b/markups/markdown.py
index 863c426..c3b8f3e 100644
--- a/markups/markdown.py
+++ b/markups/markdown.py
@@ -2,7 +2,7 @@
# This file is part of python-markups module
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2015
+# Copyright: (C) Dmitry Shachnev, 2012-2017
from __future__ import absolute_import
@@ -20,6 +20,7 @@ MathJax.Hub.Config({
jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"],
extensions: ["MathMenu.js", "MathZoom.js"],
TeX: {
+ extensions: ["AMSmath.js", "AMSsymbols.js"],
equationNumbers: {autoNumber: "AMS"}
}
});
@@ -40,9 +41,9 @@ class MarkdownMarkup(AbstractMarkup):
"""
name = 'Markdown'
attributes = {
- common.LANGUAGE_HOME_PAGE: 'http://daringfireball.net/projects/markdown/',
- common.MODULE_HOME_PAGE: 'https://github.com/Waylan/Python-Markdown/',
- common.SYNTAX_DOCUMENTATION: 'http://daringfireball.net/projects/markdown/syntax'
+ common.LANGUAGE_HOME_PAGE: 'https://daringfireball.net/projects/markdown/',
+ common.MODULE_HOME_PAGE: 'https://github.com/waylan/Python-Markdown',
+ common.SYNTAX_DOCUMENTATION: 'https://daringfireball.net/projects/markdown/syntax'
}
file_extensions = ('.md', '.mkd', '.mkdn', '.mdwn', '.mdown', '.markdown')
diff --git a/markups/restructuredtext.py b/markups/restructuredtext.py
index ed31b82..568e643 100644
--- a/markups/restructuredtext.py
+++ b/markups/restructuredtext.py
@@ -2,11 +2,12 @@
# This file is part of python-markups module
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2014
+# Copyright: (C) Dmitry Shachnev, 2012-2017
import markups.common as common
from markups.abstract import AbstractMarkup, ConvertedMarkup
+
class ReStructuredTextMarkup(AbstractMarkup):
"""Markup class for reStructuredText language.
Inherits :class:`~markups.abstract.AbstractMarkup`.
@@ -37,7 +38,10 @@ class ReStructuredTextMarkup(AbstractMarkup):
def __init__(self, filename=None, settings_overrides=None):
self.overrides = settings_overrides or {}
- self.overrides.update({'math_output': 'MathJax'})
+ self.overrides.update({
+ 'math_output': 'MathJax %s?config=TeX-AMS_CHTML' % common.MATHJAX_WEB_URL,
+ 'syntax_highlight': 'short',
+ })
AbstractMarkup.__init__(self, filename)
from docutils.core import publish_parts
self._publish_parts = publish_parts
@@ -74,13 +78,7 @@ class ConvertedReStructuredText(ConvertedMarkup):
self.head = head
def get_javascript(self, webenv=False):
- start_position = self.head.find('<script ')
- end_position = self.head.rfind('</script>')
- if start_position >= 0 and end_position >= 0:
- mjurl = self.head[start_position:end_position+9]+'\n'
- javascript = mjurl.replace(common.MATHJAX_WEB_URL,
- common.get_mathjax_url(webenv))
- else:
- javascript = ''
-
- return javascript
+ if 'MathJax.js?config=TeX-AMS_CHTML' not in self.head:
+ return ''
+ return ('<script type="text/javascript" src="%s?config=TeX-AMS_CHTML"></script>\n' %
+ common.get_mathjax_url(webenv))
diff --git a/markups/textile.py b/markups/textile.py
index 0e20a74..0017879 100644
--- a/markups/textile.py
+++ b/markups/textile.py
@@ -2,7 +2,7 @@
# This file is part of python-markups module
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2013-2015
+# Copyright: (C) Dmitry Shachnev, 2013-2016
from __future__ import absolute_import
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff --git a/setup.py b/setup.py
index 1848881..4c3568a 100755
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,7 @@ classifiers = [
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Topic :: Text Processing :: Markup',
'Topic :: Text Processing :: General',
'Topic :: Software Development :: Libraries :: Python Modules'
@@ -53,6 +54,12 @@ setup_args = {
'author_email': 'mitya57 at gmail.com',
'url': 'https://github.com/retext-project/pymarkups',
'packages': ['markups'],
+ 'extras_require': {
+ 'Markdown': ['Markdown>=2.6'],
+ 'reStructuredText': ['docutils'],
+ 'Textile': ['textile'],
+ 'highlighting': ['Pygments'],
+ },
'license': 'BSD',
'cmdclass': cmdclass,
'classifiers': classifiers
diff --git a/tests/test_markdown.py b/tests/test_markdown.py
index 24a89d4..468ab90 100644
--- a/tests/test_markdown.py
+++ b/tests/test_markdown.py
@@ -2,7 +2,7 @@
# This file is part of python-markups test suite
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2015
+# Copyright: (C) Dmitry Shachnev, 2012-2016
from markups.markdown import MarkdownMarkup, _canonicalized_ext_names
import unittest
diff --git a/tests/test_restructuredtext.py b/tests/test_restructuredtext.py
index 7d7a147..6d7e78a 100644
--- a/tests/test_restructuredtext.py
+++ b/tests/test_restructuredtext.py
@@ -2,7 +2,7 @@
# This file is part of python-markups test suite
# License: BSD
-# Copyright: (C) Dmitry Shachnev, 2012-2014
+# Copyright: (C) Dmitry Shachnev, 2012-2017
import unittest
from markups import ReStructuredTextMarkup
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pymarkups.git
More information about the Python-modules-commits
mailing list