Hello community,
here is the log from the commit of package python-markdown for openSUSE:Factory checked in at 2012-01-26 16:00:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-markdown (Old)
and /work/SRC/openSUSE:Factory/.python-markdown.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-markdown", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-markdown/python-markdown.changes 2011-11-28 12:56:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-markdown.new/python-markdown.changes 2012-01-26 16:00:17.000000000 +0100
@@ -1,0 +2,12 @@
+Tue Jan 24 09:31:19 UTC 2012 - gber@opensuse.org
+
+- update to version 2.1.1
+ - bugfix release, no new features were introduced
+ - for a full list of changes, see the git log
+
+-------------------------------------------------------------------
+Fri Dec 9 08:43:49 UTC 2011 - coolo@suse.com
+
+- fix license to be in spdx.org format
+
+-------------------------------------------------------------------
Old:
----
Markdown-2.1.0.tar.gz
New:
----
Markdown-2.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-markdown.spec ++++++
--- /var/tmp/diff_new_pack.THWeV7/_old 2012-01-26 16:00:18.000000000 +0100
+++ /var/tmp/diff_new_pack.THWeV7/_new 2012-01-26 16:00:18.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-markdown
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,12 +16,11 @@
#
-
Name: python-markdown
-Version: 2.1.0
-Release: 1
-License: BSD
+Version: 2.1.1
+Release: 0
Summary: Python Markdown Implementation
+License: BSD-3-Clause
Group: Development/Libraries/Python
Url: http://freewisdom.org/projects/python-markdown/
Source: http://pypi.python.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
++++++ Markdown-2.1.0.tar.gz -> Markdown-2.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/PKG-INFO new/Markdown-2.1.1/PKG-INFO
--- old/Markdown-2.1.0/PKG-INFO 2011-11-24 21:14:46.000000000 +0100
+++ new/Markdown-2.1.1/PKG-INFO 2012-01-22 19:57:46.000000000 +0100
@@ -1,12 +1,12 @@
Metadata-Version: 1.0
Name: Markdown
-Version: 2.1.0
+Version: 2.1.1
Summary: Python implementation of Markdown.
Home-page: http://www.freewisdom.org/projects/python-markdown
Author: Waylan Limberg
Author-email: waylan [at] gmail.com
License: BSD License
-Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.1.0.tar.gz
+Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.1.1.tar.gz
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/docs/CHANGE_LOG new/Markdown-2.1.1/docs/CHANGE_LOG
--- old/Markdown-2.1.0/docs/CHANGE_LOG 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/docs/CHANGE_LOG 2012-01-22 19:34:40.000000000 +0100
@@ -1,6 +1,10 @@
PYTHON MARKDOWN CHANGELOG
=========================
+Nov 24, 2011: Released version 2.1.0-Final.
+
+Oct 7, 2009: Released version 2.0.3-Final.
+
Sept 28, 2009: Released version 2.0.2-Final.
May 20, 2009: Released version 2.0.1-Final.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/docs/release-2.1.1.md new/Markdown-2.1.1/docs/release-2.1.1.md
--- old/Markdown-2.1.0/docs/release-2.1.1.md 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/docs/release-2.1.1.md 2012-01-22 19:48:37.000000000 +0100
@@ -0,0 +1,7 @@
+Python-Markdown 2.1.1 Release Notes
+===================================
+
+Python-Markdown 2.1.1 is a bug-fix release. No new features have been added.
+Most notably, a bug which caused raw HTML paring to run __very__ slowly has
+been fixed along with a few bugs which caused the parser to raise exceptions
+while parsing. For a full list of changes, see the git log.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/__init__.py new/Markdown-2.1.1/markdown/__init__.py
--- old/Markdown-2.1.0/markdown/__init__.py 2011-11-24 21:03:12.000000000 +0100
+++ new/Markdown-2.1.1/markdown/__init__.py 2012-01-22 19:49:55.000000000 +0100
@@ -22,7 +22,7 @@
Contact: markdown@freewisdom.org
-Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
+Copyright 2007-2012 The Python Markdown Project (v. 1.7 and later)
Copyright 200? Django Software Foundation (OrderedDict implementation)
Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
Copyright 2004 Manfred Stienstra (the original version)
@@ -30,8 +30,8 @@
License: BSD (see LICENSE for details).
"""
-version = "2.1.0"
-version_info = (2,1,0, "final")
+version = "2.1.1"
+version_info = (2,1,1, "final")
import re
import codecs
@@ -44,7 +44,7 @@
from inlinepatterns import build_inlinepatterns
from postprocessors import build_postprocessors
from extensions import Extension
-from searializers import to_html_string, to_xhtml_string
+from serializers import to_html_string, to_xhtml_string
__all__ = ['Markdown', 'markdown', 'markdownFromFile']
@@ -117,7 +117,7 @@
# ignore any additional args
break
- # Loop throu kwargs and assign defaults
+ # Loop through kwargs and assign defaults
for option, default in self.option_defaults.items():
setattr(self, option, kwargs.get(option, default))
@@ -148,7 +148,7 @@
"""
Register extensions with this instance of Markdown.
- Keyword aurguments:
+ Keyword arguments:
* extensions: A list of extensions, which can either
be strings or objects. See the docstring on Markdown.
@@ -189,7 +189,7 @@
module_name_new_style = '.'.join([ext_module, ext_name])
module_name_old_style = '_'.join(['mdx', ext_name])
- # Try loading the extention first from one place, then another
+ # Try loading the extension first from one place, then another
try: # New style (markdown.extensons.<extension>)
module = __import__(module_name_new_style, {}, {}, [ext_module])
except ImportError:
@@ -333,28 +333,38 @@
encoding = encoding or "utf-8"
# Read the source
- if isinstance(input, basestring):
- input_file = codecs.open(input, mode="r", encoding=encoding)
+ if input:
+ if isinstance(input, str):
+ input_file = codecs.open(input, mode="r", encoding=encoding)
+ else:
+ input_file = codecs.getreader(encoding)(input)
+ text = input_file.read()
+ input_file.close()
else:
- input = input or sys.stdin
- input_file = codecs.getreader(encoding)(input)
- text = input_file.read()
- input_file.close()
- text = text.lstrip(u'\ufeff') # remove the byte-order mark
+ text = sys.stdin.read()
+ if not isinstance(text, unicode):
+ text = text.decode(encoding)
+
+ text = text.lstrip('\ufeff') # remove the byte-order mark
# Convert
html = self.convert(text)
# Write to file or stdout
- if isinstance(output, basestring):
- output_file = codecs.open(output, "w",
- encoding=encoding,
- errors="xmlcharrefreplace")
- output_file.write(html)
- output_file.close()
+ if output:
+ if isinstance(output, str):
+ output_file = codecs.open(output, "w",
+ encoding=encoding,
+ errors="xmlcharrefreplace")
+ output_file.write(html)
+ output_file.close()
+ else:
+ writer = codecs.getwriter(encoding)
+ output_file = writer(output, errors="xmlcharrefreplace")
+ output_file.write(html)
+ # Don't close here. User may want to write more.
else:
- output = output or sys.stdout
- output.write(html.encode(encoding, "xmlcharrefreplace"))
+ sys.stdout.write(html)
return self
@@ -390,7 +400,7 @@
"""Read markdown code from a file and write it to a file or a stream.
This is a shortcut function which initializes an instance of Markdown,
- cand calls the convertFile method rather than convert.
+ and calls the convertFile method rather than convert.
Keyword arguments:
@@ -400,7 +410,7 @@
* Any arguments accepted by the Markdown class.
"""
- # For backward compatability loop through positional args
+ # For backward compatibility loop through positional args
pos = ['input', 'output', 'extensions', 'encoding']
c = 0
for arg in args:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/__main__.py new/Markdown-2.1.1/markdown/__main__.py
--- old/Markdown-2.1.0/markdown/__main__.py 2011-08-04 04:00:30.000000000 +0200
+++ new/Markdown-2.1.1/markdown/__main__.py 2012-01-19 03:19:48.000000000 +0100
@@ -53,7 +53,7 @@
(options, args) = parser.parse_args()
if len(args) == 0:
- input_file = sys.stdin
+ input_file = None
else:
input_file = args[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/extensions/codehilite.py new/Markdown-2.1.1/markdown/extensions/codehilite.py
--- old/Markdown-2.1.0/markdown/extensions/codehilite.py 2011-07-22 23:26:54.000000000 +0200
+++ new/Markdown-2.1.1/markdown/extensions/codehilite.py 2012-01-22 19:34:40.000000000 +0100
@@ -216,7 +216,7 @@
""" Add HilitePostprocessor to Markdown instance. """
hiliter = HiliteTreeprocessor(md)
hiliter.config = self.getConfigs()
- md.treeprocessors.add("hilite", hiliter, "_begin")
+ md.treeprocessors.add("hilite", hiliter, ">> text = '''
+ ... `````
+ ... # Arbitrary code
+ ... ~~~~~ # these tildes will not close the block
+ ... `````'''
+ >>> print markdown.markdown(text, extensions=['fenced_code'])
+ <pre><code># Arbitrary code
+ ~~~~~ # these tildes will not close the block
+ </code></pre>
+
Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/).
Project website: http://www.freewisdom.org/project/python-markdown/Fenced__Code__Blocks
@@ -69,7 +81,7 @@
# Global vars
FENCED_BLOCK_RE = re.compile( \
- r'(?P<fence>^~{3,})[ ]*(\{?\.(?P<lang>[a-zA-Z0-9_-]*)\}?)?[ ]*\n(?P<code>.*?)(?P=fence)[ ]*$',
+ r'(?P<fence>^(?:~{3,}|`{3,}))[ ]*(\{?\.?(?P<lang>[a-zA-Z0-9_-]*)\}?)?[ ]*\n(?P<code>.*?)(?<=\n)(?P=fence)[ ]*$',
re.MULTILINE|re.DOTALL
)
CODE_WRAP = '<pre>%s</code></pre>'
@@ -118,12 +130,12 @@
# is enabled, so we call it to highlite the code
if self.codehilite_conf:
highliter = CodeHilite(m.group('code'),
- linenos=self.codehilite_conf['force_linenos'],
- guess_lang=self.codehilite_conf['guess_lang'],
- css_class=self.codehilite_conf['css_class'],
- style=self.codehilite_conf['pygments_style'],
+ linenos=self.codehilite_conf['force_linenos'][0],
+ guess_lang=self.codehilite_conf['guess_lang'][0],
+ css_class=self.codehilite_conf['css_class'][0],
+ style=self.codehilite_conf['pygments_style'][0],
lang=(m.group('lang') or None),
- noclasses=self.codehilite_conf['noclasses'])
+ noclasses=self.codehilite_conf['noclasses'][0])
code = highliter.hilite()
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/extensions/footnotes.py new/Markdown-2.1.1/markdown/extensions/footnotes.py
--- old/Markdown-2.1.0/markdown/extensions/footnotes.py 2011-11-18 04:51:09.000000000 +0100
+++ new/Markdown-2.1.1/markdown/extensions/footnotes.py 2012-01-22 19:34:40.000000000 +0100
@@ -43,7 +43,11 @@
'UNIQUE_IDS':
[False,
"Avoid name collisions across "
- "multiple calls to reset()."]}
+ "multiple calls to reset()."],
+ "BACKLINK_TEXT":
+ ["↩",
+ "The text string that links from the footnote to the reader's place."]
+ }
for key, value in configs:
self.config[key][0] = value
@@ -65,10 +69,10 @@
md.inlinePatterns.add("footnote", FootnotePattern(FOOTNOTE_RE, self),
"amp_substitute")
@@ -282,9 +286,11 @@
class FootnotePostprocessor(markdown.postprocessors.Postprocessor):
""" Replace placeholders with html entities. """
+ def __init__(self, footnotes):
+ self.footnotes = footnotes
def run(self, text):
- text = text.replace(FN_BACKLINK_TEXT, "↩")
+ text = text.replace(FN_BACKLINK_TEXT, self.footnotes.getConfig("BACKLINK_TEXT"))
return text.replace(NBSP_PLACEHOLDER, " ")
def makeExtension(configs=[]):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/extensions/tables.py new/Markdown-2.1.1/markdown/extensions/tables.py
--- old/Markdown-2.1.0/markdown/extensions/tables.py 2011-07-22 23:26:54.000000000 +0200
+++ new/Markdown-2.1.1/markdown/extensions/tables.py 2012-01-19 03:19:47.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env Python
+#!/usr/bin/env python
"""
Tables Extension for Python-Markdown
====================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/inlinepatterns.py new/Markdown-2.1.1/markdown/inlinepatterns.py
--- old/Markdown-2.1.0/markdown/inlinepatterns.py 2011-10-11 03:23:52.000000000 +0200
+++ new/Markdown-2.1.1/markdown/inlinepatterns.py 2012-01-22 19:34:40.000000000 +0100
@@ -71,7 +71,8 @@
inlinePatterns["automail"] = AutomailPattern(AUTOMAIL_RE, md_instance)
inlinePatterns["linebreak2"] = SubstituteTagPattern(LINE_BREAK_2_RE, 'br')
inlinePatterns["linebreak"] = SubstituteTagPattern(LINE_BREAK_RE, 'br')
- inlinePatterns["html"] = HtmlPattern(HTML_RE, md_instance)
+ if md_instance.safeMode != 'escape':
+ inlinePatterns["html"] = HtmlPattern(HTML_RE, md_instance)
inlinePatterns["entity"] = HtmlPattern(ENTITY_RE, md_instance)
inlinePatterns["not_strong"] = SimpleTextPattern(NOT_STRONG_RE)
inlinePatterns["strong_em"] = DoubleTagPattern(STRONG_EM_RE, 'strong,em')
@@ -268,11 +269,27 @@
class HtmlPattern(Pattern):
""" Store raw inline html and return a placeholder. """
def handleMatch (self, m):
- rawhtml = m.group(2)
- inline = True
+ rawhtml = self.unescape(m.group(2))
place_holder = self.markdown.htmlStash.store(rawhtml)
return place_holder
+ def unescape(self, text):
+ """ Return unescaped text given text with an inline placeholder. """
+ try:
+ stash = self.markdown.treeprocessors['inline'].stashed_nodes
+ except KeyError:
+ return text
+ def get_stash(m):
+ id = m.group(1)
+ value = stash.get(id)
+ if value is not None:
+ try:
+ return self.markdown.serializer(value)
+ except:
+ return '\%s' % value
+
+ return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text)
+
class LinkPattern(Pattern):
""" Return a link element from the given match. """
@@ -311,20 +328,29 @@
`username:password@host:port`.
"""
+ if not self.markdown.safeMode:
+ # Return immediately bipassing parsing.
+ return url
+
+ try:
+ scheme, netloc, path, params, query, fragment = url = urlparse(url)
+ except ValueError:
+ # Bad url - so bad it couldn't be parsed.
+ return ''
+
locless_schemes = ['', 'mailto', 'news']
- scheme, netloc, path, params, query, fragment = url = urlparse(url)
- safe_url = False
- if netloc != '' or scheme in locless_schemes:
- safe_url = True
+ if netloc == '' and scheme not in locless_schemes:
+ # This fails regardless of anything else.
+ # Return immediately to save additional proccessing
+ return ''
for part in url[2:]:
if ":" in part:
- safe_url = False
+ # Not a safe url
+ return ''
- if self.markdown.safeMode and not safe_url:
- return ''
- else:
- return urlunparse(url)
+ # Url passes all tests. Return url as-is.
+ return urlunparse(url)
class ImagePattern(LinkPattern):
""" Return a img element from the given match. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/postprocessors.py new/Markdown-2.1.1/markdown/postprocessors.py
--- old/Markdown-2.1.0/markdown/postprocessors.py 2011-08-23 16:23:25.000000000 +0200
+++ new/Markdown-2.1.1/markdown/postprocessors.py 2012-01-19 05:50:34.000000000 +0100
@@ -49,7 +49,6 @@
""" Iterate over html stash and restore "safe" html. """
for i in range(self.markdown.htmlStash.html_counter):
html, safe = self.markdown.htmlStash.rawHtmlBlocks[i]
- html = self.unescape(html)
if self.markdown.safeMode and not safe:
if str(self.markdown.safeMode).lower() == 'escape':
html = self.escape(html)
@@ -65,13 +64,6 @@
html)
return text
- def unescape(self, html):
- """ Unescape any markdown escaped text within inline html. """
- for k, v in self.markdown.treeprocessors['inline'].stashed_nodes.items():
- ph = util.INLINE_PLACEHOLDER % k
- html = html.replace(ph, '\%s' % v)
- return html
-
def escape(self, html):
""" Basic html escaping """
html = html.replace('&', '&')
@@ -79,7 +71,6 @@
html = html.replace('>', '>')
return html.replace('"', '"')
-
def isblocklevel(self, html):
m = re.match(r'^\<\/?([^ ]+)', html)
if m:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/preprocessors.py new/Markdown-2.1.1/markdown/preprocessors.py
--- old/Markdown-2.1.0/markdown/preprocessors.py 2011-07-22 23:26:54.000000000 +0200
+++ new/Markdown-2.1.1/markdown/preprocessors.py 2012-01-19 04:51:05.000000000 +0100
@@ -14,7 +14,8 @@
def build_preprocessors(md_instance, **kwargs):
""" Build the default set of preprocessors used by Markdown. """
preprocessors = odict.OrderedDict()
- preprocessors["html_block"] = HtmlBlockPreprocessor(md_instance)
+ if md_instance.safeMode != 'escape':
+ preprocessors["html_block"] = HtmlBlockPreprocessor(md_instance)
preprocessors["reference"] = ReferencePreprocessor(md_instance)
return preprocessors
@@ -78,7 +79,7 @@
attrs[ma.group('attr2').strip()] = ""
return tag, len(m.group(0)), attrs
else:
- tag = block[1:].replace(">", " ", 1).split()[0].lower()
+ tag = block[1:].split(">", 1)[0].lower()
return tag, len(tag)+2, {}
def _recursive_tagfind(self, ltag, rtag, start_index, block):
@@ -143,21 +144,20 @@
if not in_tag:
if block.startswith("<") and len(block.strip()) > 1:
- left_tag, left_index, attrs = self._get_left_tag(block)
- right_tag, data_index = self._get_right_tag(left_tag,
- left_index,
- block)
if block[1] == "!":
# is a comment block
- left_tag = "--"
- right_tag, data_index = self._get_right_tag(left_tag,
- left_index,
- block)
- # keep checking conditions below and maybe just append
+ left_tag, left_index, attrs = "--", 2, ()
+ else:
+ left_tag, left_index, attrs = self._get_left_tag(block)
+ right_tag, data_index = self._get_right_tag(left_tag,
+ left_index,
+ block)
+ # keep checking conditions below and maybe just append
if data_index < len(block) \
- and util.isBlockLevel(left_tag):
+ and (util.isBlockLevel(left_tag)
+ or left_tag == '--'):
text.insert(0, block[data_index:])
block = block[:data_index]
@@ -204,12 +204,16 @@
else:
items.append(block)
- right_tag, data_index = self._get_right_tag(left_tag,
- left_index,
- block)
+ right_tag, data_index = self._get_right_tag(left_tag, 0, block)
if self._equal_tags(left_tag, right_tag):
# if find closing tag
+
+ if data_index < len(block):
+ # we have more text after right_tag
+ items[-1] = block[:data_index]
+ text.insert(0, block[data_index:])
+
in_tag = False
if self.markdown_in_raw and 'markdown' in attrs.keys():
start = re.sub(r'\smarkdown(=[\'"]?[^> ]*[\'"]?)?',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/searializers.py new/Markdown-2.1.1/markdown/searializers.py
--- old/Markdown-2.1.0/markdown/searializers.py 2011-07-29 03:53:22.000000000 +0200
+++ new/Markdown-2.1.1/markdown/searializers.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,275 +0,0 @@
-# markdown/searializers.py
-#
-# Add x/html serialization to Elementree
-# Taken from ElementTree 1.3 preview with slight modifications
-#
-# Copyright (c) 1999-2007 by Fredrik Lundh. All rights reserved.
-#
-# fredrik@pythonware.com
-# http://www.pythonware.com
-#
-# --------------------------------------------------------------------
-# The ElementTree toolkit is
-#
-# Copyright (c) 1999-2007 by Fredrik Lundh
-#
-# By obtaining, using, and/or copying this software and/or its
-# associated documentation, you agree that you have read, understood,
-# and will comply with the following terms and conditions:
-#
-# Permission to use, copy, modify, and distribute this software and
-# its associated documentation for any purpose and without fee is
-# hereby granted, provided that the above copyright notice appears in
-# all copies, and that both that copyright notice and this permission
-# notice appear in supporting documentation, and that the name of
-# Secret Labs AB or the author not be used in advertising or publicity
-# pertaining to distribution of the software without specific, written
-# prior permission.
-#
-# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
-# ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
-# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
-# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-# --------------------------------------------------------------------
-
-
-import util
-ElementTree = util.etree.ElementTree
-QName = util.etree.QName
-if hasattr(util.etree, 'test_comment'):
- Comment = util.etree.test_comment
-else:
- Comment = util.etree.Comment
-PI = util.etree.PI
-ProcessingInstruction = util.etree.ProcessingInstruction
-
-__all__ = ['to_html_string', 'to_xhtml_string']
-
-HTML_EMPTY = ("area", "base", "basefont", "br", "col", "frame", "hr",
- "img", "input", "isindex", "link", "meta" "param")
-
-try:
- HTML_EMPTY = set(HTML_EMPTY)
-except NameError:
- pass
-
-_namespace_map = {
- # "well-known" namespace prefixes
- "http://www.w3.org/XML/1998/namespace": "xml",
- "http://www.w3.org/1999/xhtml": "html",
- "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf",
- "http://schemas.xmlsoap.org/wsdl/": "wsdl",
- # xml schema
- "http://www.w3.org/2001/XMLSchema": "xs",
- "http://www.w3.org/2001/XMLSchema-instance": "xsi",
- # dublic core
- "http://purl.org/dc/elements/1.1/": "dc",
-}
-
-
-def _raise_serialization_error(text):
- raise TypeError(
- "cannot serialize %r (type %s)" % (text, type(text).__name__)
- )
-
-def _encode(text, encoding):
- try:
- return text.encode(encoding, "xmlcharrefreplace")
- except (TypeError, AttributeError):
- _raise_serialization_error(text)
-
-def _escape_cdata(text):
- # escape character data
- try:
- # it's worth avoiding do-nothing calls for strings that are
- # shorter than 500 character, or so. assume that's, by far,
- # the most common case in most applications.
- if "&" in text:
- text = text.replace("&", "&")
- if "<" in text:
- text = text.replace("<", "<")
- if ">" in text:
- text = text.replace(">", ">")
- return text
- except (TypeError, AttributeError):
- _raise_serialization_error(text)
-
-
-def _escape_attrib(text):
- # escape attribute value
- try:
- if "&" in text:
- text = text.replace("&", "&")
- if "<" in text:
- text = text.replace("<", "<")
- if ">" in text:
- text = text.replace(">", ">")
- if "\"" in text:
- text = text.replace("\"", """)
- if "\n" in text:
- text = text.replace("\n", "
")
- return text
- except (TypeError, AttributeError):
- _raise_serialization_error(text)
-
-def _escape_attrib_html(text):
- # escape attribute value
- try:
- if "&" in text:
- text = text.replace("&", "&")
- if "<" in text:
- text = text.replace("<", "<")
- if ">" in text:
- text = text.replace(">", ">")
- if "\"" in text:
- text = text.replace("\"", """)
- return text
- except (TypeError, AttributeError):
- _raise_serialization_error(text)
-
-
-def _serialize_html(write, elem, qnames, namespaces, format):
- tag = elem.tag
- text = elem.text
- if tag is Comment:
- write("<!--%s-->" % _escape_cdata(text))
- elif tag is ProcessingInstruction:
- write("<?%s?>" % _escape_cdata(text))
- else:
- tag = qnames[tag]
- if tag is None:
- if text:
- write(_escape_cdata(text))
- for e in elem:
- _serialize_html(write, e, qnames, None, format)
- else:
- write("<" + tag)
- items = elem.items()
- if items or namespaces:
- items.sort() # lexical order
- for k, v in items:
- if isinstance(k, QName):
- k = k.text
- if isinstance(v, QName):
- v = qnames[v.text]
- else:
- v = _escape_attrib_html(v)
- if qnames[k] == v and format == 'html':
- # handle boolean attributes
- write(" %s" % v)
- else:
- write(" %s=\"%s\"" % (qnames[k], v))
- if namespaces:
- items = namespaces.items()
- items.sort(key=lambda x: x[1]) # sort on prefix
- for v, k in items:
- if k:
- k = ":" + k
- write(" xmlns%s=\"%s\"" % (k, _escape_attrib(v)))
- if format == "xhtml" and tag in HTML_EMPTY:
- write(" />")
- else:
- write(">")
- tag = tag.lower()
- if text:
- if tag == "script" or tag == "style":
- write(text)
- else:
- write(_escape_cdata(text))
- for e in elem:
- _serialize_html(write, e, qnames, None, format)
- if tag not in HTML_EMPTY:
- write("" + tag + ">")
- if elem.tail:
- write(_escape_cdata(elem.tail))
-
-def _write_html(root,
- encoding=None,
- default_namespace=None,
- format="html"):
- assert root is not None
- data = []
- write = data.append
- qnames, namespaces = _namespaces(root, default_namespace)
- _serialize_html(write, root, qnames, namespaces, format)
- if encoding is None:
- return "".join(data)
- else:
- return _encode("".join(data))
-
-
-# --------------------------------------------------------------------
-# serialization support
-
-def _namespaces(elem, default_namespace=None):
- # identify namespaces used in this tree
-
- # maps qnames to *encoded* prefix:local names
- qnames = {None: None}
-
- # maps uri:s to prefixes
- namespaces = {}
- if default_namespace:
- namespaces[default_namespace] = ""
-
- def add_qname(qname):
- # calculate serialized qname representation
- try:
- if qname[:1] == "{":
- uri, tag = qname[1:].split("}", 1)
- prefix = namespaces.get(uri)
- if prefix is None:
- prefix = _namespace_map.get(uri)
- if prefix is None:
- prefix = "ns%d" % len(namespaces)
- if prefix != "xml":
- namespaces[uri] = prefix
- if prefix:
- qnames[qname] = "%s:%s" % (prefix, tag)
- else:
- qnames[qname] = tag # default element
- else:
- if default_namespace:
- raise ValueError(
- "cannot use non-qualified names with "
- "default_namespace option"
- )
- qnames[qname] = qname
- except TypeError:
- _raise_serialization_error(qname)
-
- # populate qname and namespaces table
- try:
- iterate = elem.iter
- except AttributeError:
- iterate = elem.getiterator # cET compatibility
- for elem in iterate():
- tag = elem.tag
- if isinstance(tag, QName) and tag.text not in qnames:
- add_qname(tag.text)
- elif isinstance(tag, basestring):
- if tag not in qnames:
- add_qname(tag)
- elif tag is not None and tag is not Comment and tag is not PI:
- _raise_serialization_error(tag)
- for key, value in elem.items():
- if isinstance(key, QName):
- key = key.text
- if key not in qnames:
- add_qname(key)
- if isinstance(value, QName) and value.text not in qnames:
- add_qname(value.text)
- text = elem.text
- if isinstance(text, QName) and text.text not in qnames:
- add_qname(text.text)
- return qnames, namespaces
-
-def to_html_string(element):
- return _write_html(ElementTree(element).getroot(), format="html")
-
-def to_xhtml_string(element):
- return _write_html(ElementTree(element).getroot(), format="xhtml")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/markdown/serializers.py new/Markdown-2.1.1/markdown/serializers.py
--- old/Markdown-2.1.0/markdown/serializers.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/markdown/serializers.py 2012-01-22 19:34:40.000000000 +0100
@@ -0,0 +1,275 @@
+# markdown/searializers.py
+#
+# Add x/html serialization to Elementree
+# Taken from ElementTree 1.3 preview with slight modifications
+#
+# Copyright (c) 1999-2007 by Fredrik Lundh. All rights reserved.
+#
+# fredrik@pythonware.com
+# http://www.pythonware.com
+#
+# --------------------------------------------------------------------
+# The ElementTree toolkit is
+#
+# Copyright (c) 1999-2007 by Fredrik Lundh
+#
+# By obtaining, using, and/or copying this software and/or its
+# associated documentation, you agree that you have read, understood,
+# and will comply with the following terms and conditions:
+#
+# Permission to use, copy, modify, and distribute this software and
+# its associated documentation for any purpose and without fee is
+# hereby granted, provided that the above copyright notice appears in
+# all copies, and that both that copyright notice and this permission
+# notice appear in supporting documentation, and that the name of
+# Secret Labs AB or the author not be used in advertising or publicity
+# pertaining to distribution of the software without specific, written
+# prior permission.
+#
+# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
+# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
+# ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
+# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+# --------------------------------------------------------------------
+
+
+import util
+ElementTree = util.etree.ElementTree
+QName = util.etree.QName
+if hasattr(util.etree, 'test_comment'):
+ Comment = util.etree.test_comment
+else:
+ Comment = util.etree.Comment
+PI = util.etree.PI
+ProcessingInstruction = util.etree.ProcessingInstruction
+
+__all__ = ['to_html_string', 'to_xhtml_string']
+
+HTML_EMPTY = ("area", "base", "basefont", "br", "col", "frame", "hr",
+ "img", "input", "isindex", "link", "meta" "param")
+
+try:
+ HTML_EMPTY = set(HTML_EMPTY)
+except NameError:
+ pass
+
+_namespace_map = {
+ # "well-known" namespace prefixes
+ "http://www.w3.org/XML/1998/namespace": "xml",
+ "http://www.w3.org/1999/xhtml": "html",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf",
+ "http://schemas.xmlsoap.org/wsdl/": "wsdl",
+ # xml schema
+ "http://www.w3.org/2001/XMLSchema": "xs",
+ "http://www.w3.org/2001/XMLSchema-instance": "xsi",
+ # dublic core
+ "http://purl.org/dc/elements/1.1/": "dc",
+}
+
+
+def _raise_serialization_error(text):
+ raise TypeError(
+ "cannot serialize %r (type %s)" % (text, type(text).__name__)
+ )
+
+def _encode(text, encoding):
+ try:
+ return text.encode(encoding, "xmlcharrefreplace")
+ except (TypeError, AttributeError):
+ _raise_serialization_error(text)
+
+def _escape_cdata(text):
+ # escape character data
+ try:
+ # it's worth avoiding do-nothing calls for strings that are
+ # shorter than 500 character, or so. assume that's, by far,
+ # the most common case in most applications.
+ if "&" in text:
+ text = text.replace("&", "&")
+ if "<" in text:
+ text = text.replace("<", "<")
+ if ">" in text:
+ text = text.replace(">", ">")
+ return text
+ except (TypeError, AttributeError):
+ _raise_serialization_error(text)
+
+
+def _escape_attrib(text):
+ # escape attribute value
+ try:
+ if "&" in text:
+ text = text.replace("&", "&")
+ if "<" in text:
+ text = text.replace("<", "<")
+ if ">" in text:
+ text = text.replace(">", ">")
+ if "\"" in text:
+ text = text.replace("\"", """)
+ if "\n" in text:
+ text = text.replace("\n", "
")
+ return text
+ except (TypeError, AttributeError):
+ _raise_serialization_error(text)
+
+def _escape_attrib_html(text):
+ # escape attribute value
+ try:
+ if "&" in text:
+ text = text.replace("&", "&")
+ if "<" in text:
+ text = text.replace("<", "<")
+ if ">" in text:
+ text = text.replace(">", ">")
+ if "\"" in text:
+ text = text.replace("\"", """)
+ return text
+ except (TypeError, AttributeError):
+ _raise_serialization_error(text)
+
+
+def _serialize_html(write, elem, qnames, namespaces, format):
+ tag = elem.tag
+ text = elem.text
+ if tag is Comment:
+ write("<!--%s-->" % _escape_cdata(text))
+ elif tag is ProcessingInstruction:
+ write("<?%s?>" % _escape_cdata(text))
+ else:
+ tag = qnames[tag]
+ if tag is None:
+ if text:
+ write(_escape_cdata(text))
+ for e in elem:
+ _serialize_html(write, e, qnames, None, format)
+ else:
+ write("<" + tag)
+ items = elem.items()
+ if items or namespaces:
+ items.sort() # lexical order
+ for k, v in items:
+ if isinstance(k, QName):
+ k = k.text
+ if isinstance(v, QName):
+ v = qnames[v.text]
+ else:
+ v = _escape_attrib_html(v)
+ if qnames[k] == v and format == 'html':
+ # handle boolean attributes
+ write(" %s" % v)
+ else:
+ write(" %s=\"%s\"" % (qnames[k], v))
+ if namespaces:
+ items = namespaces.items()
+ items.sort(key=lambda x: x[1]) # sort on prefix
+ for v, k in items:
+ if k:
+ k = ":" + k
+ write(" xmlns%s=\"%s\"" % (k, _escape_attrib(v)))
+ if format == "xhtml" and tag in HTML_EMPTY:
+ write(" />")
+ else:
+ write(">")
+ tag = tag.lower()
+ if text:
+ if tag == "script" or tag == "style":
+ write(text)
+ else:
+ write(_escape_cdata(text))
+ for e in elem:
+ _serialize_html(write, e, qnames, None, format)
+ if tag not in HTML_EMPTY:
+ write("" + tag + ">")
+ if elem.tail:
+ write(_escape_cdata(elem.tail))
+
+def _write_html(root,
+ encoding=None,
+ default_namespace=None,
+ format="html"):
+ assert root is not None
+ data = []
+ write = data.append
+ qnames, namespaces = _namespaces(root, default_namespace)
+ _serialize_html(write, root, qnames, namespaces, format)
+ if encoding is None:
+ return "".join(data)
+ else:
+ return _encode("".join(data))
+
+
+# --------------------------------------------------------------------
+# serialization support
+
+def _namespaces(elem, default_namespace=None):
+ # identify namespaces used in this tree
+
+ # maps qnames to *encoded* prefix:local names
+ qnames = {None: None}
+
+ # maps uri:s to prefixes
+ namespaces = {}
+ if default_namespace:
+ namespaces[default_namespace] = ""
+
+ def add_qname(qname):
+ # calculate serialized qname representation
+ try:
+ if qname[:1] == "{":
+ uri, tag = qname[1:].split("}", 1)
+ prefix = namespaces.get(uri)
+ if prefix is None:
+ prefix = _namespace_map.get(uri)
+ if prefix is None:
+ prefix = "ns%d" % len(namespaces)
+ if prefix != "xml":
+ namespaces[uri] = prefix
+ if prefix:
+ qnames[qname] = "%s:%s" % (prefix, tag)
+ else:
+ qnames[qname] = tag # default element
+ else:
+ if default_namespace:
+ raise ValueError(
+ "cannot use non-qualified names with "
+ "default_namespace option"
+ )
+ qnames[qname] = qname
+ except TypeError:
+ _raise_serialization_error(qname)
+
+ # populate qname and namespaces table
+ try:
+ iterate = elem.iter
+ except AttributeError:
+ iterate = elem.getiterator # cET compatibility
+ for elem in iterate():
+ tag = elem.tag
+ if isinstance(tag, QName) and tag.text not in qnames:
+ add_qname(tag.text)
+ elif isinstance(tag, basestring):
+ if tag not in qnames:
+ add_qname(tag)
+ elif tag is not None and tag is not Comment and tag is not PI:
+ _raise_serialization_error(tag)
+ for key, value in elem.items():
+ if isinstance(key, QName):
+ key = key.text
+ if key not in qnames:
+ add_qname(key)
+ if isinstance(value, QName) and value.text not in qnames:
+ add_qname(value.text)
+ text = elem.text
+ if isinstance(text, QName) and text.text not in qnames:
+ add_qname(text.text)
+ return qnames, namespaces
+
+def to_html_string(element):
+ return _write_html(ElementTree(element).getroot(), format="html")
+
+def to_xhtml_string(element):
+ return _write_html(ElementTree(element).getroot(), format="xhtml")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/setup.py new/Markdown-2.1.1/setup.py
--- old/Markdown-2.1.0/setup.py 2011-11-24 21:04:34.000000000 +0100
+++ new/Markdown-2.1.1/setup.py 2012-01-22 19:51:46.000000000 +0100
@@ -16,7 +16,7 @@
raise ImportError("build_py_2to3 is required to build in Python 3.x.")
from distutils.command.build_py import build_py
-version = '2.1.0'
+version = '2.1.1'
# The command line script name. Currently set to "markdown_py" so as not to
# conflict with the perl implimentation (which uses "markdown"). We can't use
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/basic/inline-html-simple.html new/Markdown-2.1.1/tests/basic/inline-html-simple.html
--- old/Markdown-2.1.0/tests/basic/inline-html-simple.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/basic/inline-html-simple.html 2012-01-22 19:34:40.000000000 +0100
@@ -55,4 +55,6 @@
<hr class="foo" id="bar"/>
-<hr class="foo" id="bar" >
\ No newline at end of file
+<hr class="foo" id="bar" >
+
+<p></p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/basic/inline-html-simple.txt new/Markdown-2.1.1/tests/basic/inline-html-simple.txt
--- old/Markdown-2.1.0/tests/basic/inline-html-simple.txt 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/basic/inline-html-simple.txt 2012-01-22 19:34:40.000000000 +0100
@@ -67,3 +67,4 @@
<hr class="foo" id="bar" >
+http://example.com) stuff>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/extensions/fenced_code.html new/Markdown-2.1.1/tests/extensions/fenced_code.html
--- old/Markdown-2.1.0/tests/extensions/fenced_code.html 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/tests/extensions/fenced_code.html 2012-01-19 03:41:46.000000000 +0100
@@ -0,0 +1,32 @@
+<p>index 0000000..6e956a9</p>
+<pre><code>--- /dev/null
++++ b/test/data/stripped_text/mike-30-lili
+@@ -0,0 +1,27 @@
++Summary:
++ drift_mod.py | 1 +
++ 1 files changed, 1 insertions(+), 0 deletions(-)
++
++commit da4bfb04debdd994683740878d09988b2641513d
++Author: Mike Dirolf <mike@dirolf.com>
++Date: Tue Jan 17 13:42:28 2012 -0500
++
++```
++minor: just wanted to push something.
++```
++
++diff --git a/drift_mod.py b/drift_mod.py
++index 34dfba6..8a88a69 100644
++
++```
++--- a/drift_mod.py
+++++ b/drift_mod.py
++@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^('
++ '|\+ .*'
++ '|- .*'
++ ')$')
+++
++ def wrap_context_diffs(message_text):
++ return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN,
++ CONTEXT_DIFF_LINE_PATTERN,
++```
+</code></pre>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/extensions/fenced_code.txt new/Markdown-2.1.1/tests/extensions/fenced_code.txt
--- old/Markdown-2.1.0/tests/extensions/fenced_code.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/tests/extensions/fenced_code.txt 2012-01-19 03:41:46.000000000 +0100
@@ -0,0 +1,34 @@
+index 0000000..6e956a9
+
+```
+--- /dev/null
++++ b/test/data/stripped_text/mike-30-lili
+@@ -0,0 +1,27 @@
++Summary:
++ drift_mod.py | 1 +
++ 1 files changed, 1 insertions(+), 0 deletions(-)
++
++commit da4bfb04debdd994683740878d09988b2641513d
++Author: Mike Dirolf
++Date: Tue Jan 17 13:42:28 2012 -0500
++
++```
++minor: just wanted to push something.
++```
++
++diff --git a/drift_mod.py b/drift_mod.py
++index 34dfba6..8a88a69 100644
++
++```
++--- a/drift_mod.py
+++++ b/drift_mod.py
++@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^('
++ '|\+ .*'
++ '|- .*'
++ ')$')
+++
++ def wrap_context_diffs(message_text):
++ return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN,
++ CONTEXT_DIFF_LINE_PATTERN,
++```
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/extensions/github_flavored.html new/Markdown-2.1.1/tests/extensions/github_flavored.html
--- old/Markdown-2.1.0/tests/extensions/github_flavored.html 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/tests/extensions/github_flavored.html 2012-01-22 19:34:40.000000000 +0100
@@ -0,0 +1,32 @@
+<p>index 0000000..6e956a9</p>
+<pre><code class="diff">--- /dev/null
++++ b/test/data/stripped_text/mike-30-lili
+@@ -0,0 +1,27 @@
++Summary:
++ drift_mod.py | 1 +
++ 1 files changed, 1 insertions(+), 0 deletions(-)
++
++commit da4bfb04debdd994683740878d09988b2641513d
++Author: Mike Dirolf <mike@dirolf.com>
++Date: Tue Jan 17 13:42:28 2012 -0500
++
++```
++minor: just wanted to push something.
++```
++
++diff --git a/drift_mod.py b/drift_mod.py
++index 34dfba6..8a88a69 100644
++
++```
++--- a/drift_mod.py
+++++ b/drift_mod.py
++@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^('
++ '|\+ .*'
++ '|- .*'
++ ')$')
+++
++ def wrap_context_diffs(message_text):
++ return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN,
++ CONTEXT_DIFF_LINE_PATTERN,
++```
+</code></pre>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/extensions/github_flavored.txt new/Markdown-2.1.1/tests/extensions/github_flavored.txt
--- old/Markdown-2.1.0/tests/extensions/github_flavored.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/tests/extensions/github_flavored.txt 2012-01-19 03:41:46.000000000 +0100
@@ -0,0 +1,34 @@
+index 0000000..6e956a9
+
+```diff
+--- /dev/null
++++ b/test/data/stripped_text/mike-30-lili
+@@ -0,0 +1,27 @@
++Summary:
++ drift_mod.py | 1 +
++ 1 files changed, 1 insertions(+), 0 deletions(-)
++
++commit da4bfb04debdd994683740878d09988b2641513d
++Author: Mike Dirolf
++Date: Tue Jan 17 13:42:28 2012 -0500
++
++```
++minor: just wanted to push something.
++```
++
++diff --git a/drift_mod.py b/drift_mod.py
++index 34dfba6..8a88a69 100644
++
++```
++--- a/drift_mod.py
+++++ b/drift_mod.py
++@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^('
++ '|\+ .*'
++ '|- .*'
++ ')$')
+++
++ def wrap_context_diffs(message_text):
++ return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN,
++ CONTEXT_DIFF_LINE_PATTERN,
++```
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/extensions/test.cfg new/Markdown-2.1.1/tests/extensions/test.cfg
--- old/Markdown-2.1.0/tests/extensions/test.cfg 2011-07-22 23:26:54.000000000 +0200
+++ new/Markdown-2.1.1/tests/extensions/test.cfg 2012-01-22 19:34:40.000000000 +0100
@@ -4,7 +4,7 @@
[codehilite]
extensions=codehilite
# This passes or not based on version of pygments.
-skip=1
+skip=1
[toc]
extensions=toc
@@ -20,3 +20,9 @@
[wikilinks]
extensions=wikilinks
+
+[fenced_code]
+extensions=fenced_code
+
+[github_flavored]
+extensions=fenced_code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/misc/comments.html new/Markdown-2.1.1/tests/misc/comments.html
--- old/Markdown-2.1.0/tests/misc/comments.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/misc/comments.html 2012-01-19 03:19:48.000000000 +0100
@@ -2,4 +2,8 @@
<p>X>0</p>
<!-- A comment -->
-<div>as if</div>
\ No newline at end of file
+<div>as if</div>
+
+<!-- comment -->
+
+<p><strong>no blank line</strong></p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/misc/comments.txt new/Markdown-2.1.1/tests/misc/comments.txt
--- old/Markdown-2.1.0/tests/misc/comments.txt 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/misc/comments.txt 2012-01-19 03:19:48.000000000 +0100
@@ -5,3 +5,6 @@
<!-- A comment -->
<div>as if</div>
+
+<!-- comment -->
+__no blank line__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/misc/mismatched-tags.html new/Markdown-2.1.1/tests/misc/mismatched-tags.html
--- old/Markdown-2.1.0/tests/misc/mismatched-tags.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/misc/mismatched-tags.html 2012-01-19 03:19:48.000000000 +0100
@@ -6,6 +6,9 @@
<p>And this output</p>
<p><em>Compatible with PHP Markdown Extra 1.2.2 and Markdown.pl1.0.2b8:</em></p>
-<!-- comment --><p><div>text</div><br /></p><br />
+<!-- comment -->
+<p><div>text</div><br /></p>
+
+<p><br /></p>
<p>Should be in p</p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/misc/multi-line-tags.html new/Markdown-2.1.1/tests/misc/multi-line-tags.html
--- old/Markdown-2.1.0/tests/misc/multi-line-tags.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/misc/multi-line-tags.html 2012-01-19 03:19:48.000000000 +0100
@@ -2,4 +2,12 @@
asdf asdfasd
-</div>
\ No newline at end of file
+</div>
+
+<div>
+
+foo bar
+
+</div>
+
+<p>No blank line.</p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/misc/multi-line-tags.txt new/Markdown-2.1.1/tests/misc/multi-line-tags.txt
--- old/Markdown-2.1.0/tests/misc/multi-line-tags.txt 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/misc/multi-line-tags.txt 2012-01-19 03:19:48.000000000 +0100
@@ -4,3 +4,10 @@
asdf asdfasd
</div>
+
+<div>
+
+foo bar
+
+</div>
+No blank line.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/misc/multiline-comments.html new/Markdown-2.1.1/tests/misc/multiline-comments.html
--- old/Markdown-2.1.0/tests/misc/multiline-comments.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/misc/multiline-comments.html 2012-01-19 03:19:48.000000000 +0100
@@ -2,7 +2,7 @@
foo
--->
+-->
<p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/html_then_blockquote.html new/Markdown-2.1.1/tests/safe_mode/html_then_blockquote.html
--- old/Markdown-2.1.0/tests/safe_mode/html_then_blockquote.html 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/tests/safe_mode/html_then_blockquote.html 2012-01-22 19:34:40.000000000 +0100
@@ -0,0 +1,6 @@
+<p>to:</p>
+<p><td /><td style="text-align: center; white-space: nowrap;"><br /></p>
+<blockquote>
+<p>3) You don't need to alter all localization files.
+ Adding the new labels to the en_US files will do it.</p>
+</blockquote>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/html_then_blockquote.txt new/Markdown-2.1.1/tests/safe_mode/html_then_blockquote.txt
--- old/Markdown-2.1.0/tests/safe_mode/html_then_blockquote.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/Markdown-2.1.1/tests/safe_mode/html_then_blockquote.txt 2012-01-19 03:41:46.000000000 +0100
@@ -0,0 +1,6 @@
+to:
+
+<td /><td style="text-align: center; white-space: nowrap;"><br />
+
+> 3) You don't need to alter all localization files.
+> Adding the new labels to the en_US files will do it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/inline-html-simple.html new/Markdown-2.1.1/tests/safe_mode/inline-html-simple.html
--- old/Markdown-2.1.0/tests/safe_mode/inline-html-simple.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/inline-html-simple.html 2012-01-22 19:34:40.000000000 +0100
@@ -29,7 +29,8 @@
<pre><code><!-- Comment -->
</code></pre>
<p>Just plain comment, with trailing spaces on the line:</p>
-<p><!-- foo --></p>
+<p><!-- foo --> <br />
+</p>
<p>Code:</p>
<pre><code><hr />
</code></pre>
@@ -37,9 +38,12 @@
<p><hr></p>
<p><hr/></p>
<p><hr /></p>
-<p><hr></p>
-<p><hr/></p>
-<p><hr /></p>
-<p><hr class="foo" id="bar" /></p>
-<p><hr class="foo" id="bar"/></p>
-<p><hr class="foo" id="bar" ></p>
\ No newline at end of file
+<p><hr> <br />
+</p>
+<p><hr/><br />
+</p>
+<p><hr /> </p>
+<p><hr class="foo" id="bar" /></p>
+<p><hr class="foo" id="bar"/></p>
+<p><hr class="foo" id="bar" ></p>
+<p><some <a href="http://example.com">weird</a> stuff></p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/inline-html-simple.txt new/Markdown-2.1.1/tests/safe_mode/inline-html-simple.txt
--- old/Markdown-2.1.0/tests/safe_mode/inline-html-simple.txt 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/inline-html-simple.txt 2012-01-22 19:34:40.000000000 +0100
@@ -67,3 +67,4 @@
<hr class="foo" id="bar" >
+http://example.com) stuff>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/remove.html new/Markdown-2.1.1/tests/safe_mode/remove.html
--- old/Markdown-2.1.0/tests/safe_mode/remove.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/remove.html 2012-01-22 19:34:40.000000000 +0100
@@ -31,4 +31,5 @@
<p></p>
<p></p>
<p></p>
+<p></p>
<p></p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/remove.txt new/Markdown-2.1.1/tests/safe_mode/remove.txt
--- old/Markdown-2.1.0/tests/safe_mode/remove.txt 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/remove.txt 2012-01-22 19:34:40.000000000 +0100
@@ -67,3 +67,4 @@
<hr class="foo" id="bar" >
+http://example.com) stuff>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/replace.html new/Markdown-2.1.1/tests/safe_mode/replace.html
--- old/Markdown-2.1.0/tests/safe_mode/replace.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/replace.html 2012-01-22 19:34:40.000000000 +0100
@@ -31,4 +31,5 @@
<p>[HTML_REMOVED]</p>
<p>[HTML_REMOVED]</p>
<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
<p>[HTML_REMOVED]</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/replace.txt new/Markdown-2.1.1/tests/safe_mode/replace.txt
--- old/Markdown-2.1.0/tests/safe_mode/replace.txt 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/replace.txt 2012-01-22 19:34:40.000000000 +0100
@@ -67,3 +67,4 @@
<hr class="foo" id="bar" >
+http://example.com) stuff>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/safe_mode/script_tags.html new/Markdown-2.1.1/tests/safe_mode/script_tags.html
--- old/Markdown-2.1.0/tests/safe_mode/script_tags.html 2011-04-29 04:02:44.000000000 +0200
+++ new/Markdown-2.1.1/tests/safe_mode/script_tags.html 2012-01-22 19:34:40.000000000 +0100
@@ -1,28 +1,20 @@
<p>This should be stripped/escaped in safe_mode.</p>
<p><script>
-alert("Hello world!")
+alert("Hello world!")
</script></p>
<p>With blank lines.</p>
-<p><script>
-
-alert("Hello world!")
-
-</script></p>
+<p><script></p>
+<p>alert("Hello world!")</p>
+<p></script></p>
<p>Now with some weirdness</p>
<p><code><script <!--
alert("Hello world!")
</script <></code> `</p>
<p>Try another way.</p>
<p><script <!--
-alert("Hello world!")
-</script <>
-
-This time with blank lines.
-
-<script <!--
-
-alert("Hello world!")
-
-</script <>
-
-</p>
\ No newline at end of file
+alert("Hello world!")
+</script <></p>
+<p>This time with blank lines.</p>
+<p><script <!--</p>
+<p>alert("Hello world!")</p>
+<p></script <></p>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.1.0/tests/test_apis.py new/Markdown-2.1.1/tests/test_apis.py
--- old/Markdown-2.1.0/tests/test_apis.py 2011-07-29 03:53:22.000000000 +0200
+++ new/Markdown-2.1.1/tests/test_apis.py 2012-01-22 19:34:40.000000000 +0100
@@ -46,7 +46,7 @@
root = markdown.util.etree.Element("div")
text = 'foo'
self.parser.parseChunk(root, text)
- self.assertEqual(markdown.searializers.to_xhtml_string(root),
+ self.assertEqual(markdown.serializers.to_xhtml_string(root),
"<div><p>foo</p></div>")
def testParseDocument(self):
@@ -55,7 +55,7 @@
tree = self.parser.parseDocument(lines)
self.assertTrue(isinstance(tree, markdown.util.etree.ElementTree))
self.assertTrue(markdown.util.etree.iselement(tree.getroot()))
- self.assertEqual(markdown.searializers.to_xhtml_string(tree.getroot()),
+ self.assertEqual(markdown.serializers.to_xhtml_string(tree.getroot()),
"<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>")
@@ -303,14 +303,14 @@
def testCommentSerialization(self):
""" Test that an ElementTree Comment serializes properly. """
- self.assertEqual(markdown.searializers.to_html_string(self.comment),
+ self.assertEqual(markdown.serializers.to_html_string(self.comment),
'<!--foo-->')
def testCommentPrettify(self):
""" Test that an ElementTree Comment is prettified properly. """
pretty = markdown.treeprocessors.PrettifyTreeprocessor()
pretty.run(self.comment)
- self.assertEqual(markdown.searializers.to_html_string(self.comment),
+ self.assertEqual(markdown.serializers.to_html_string(self.comment),
'<!--foo-->\n')
@@ -327,7 +327,7 @@
p = markdown.util.etree.SubElement(tree, 'p')
p.text = u'some *text*'
new = self.inlineprocessor.run(tree)
- self.assertEqual(markdown.searializers.to_html_string(new),
+ self.assertEqual(markdown.serializers.to_html_string(new),
'<div><p>some <em>text</em></p></div>')
def testSimpleAtomicString(self):
@@ -336,7 +336,7 @@
p = markdown.util.etree.SubElement(tree, 'p')
p.text = markdown.util.AtomicString(u'some *text*')
new = self.inlineprocessor.run(tree)
- self.assertEqual(markdown.searializers.to_html_string(new),
+ self.assertEqual(markdown.serializers.to_html_string(new),
'<div><p>some *text*</p></div>')
def testNestedAtomicString(self):
@@ -354,7 +354,7 @@
span2.tail = markdown.util.AtomicString(u' *test*')
span1.tail = markdown.util.AtomicString(u' *with*')
new = self.inlineprocessor.run(tree)
- self.assertEqual(markdown.searializers.to_html_string(new),
+ self.assertEqual(markdown.serializers.to_html_string(new),
'<div><p>*some* <span>*more* <span>*text* <span>*here*</span> '
'*to*</span> *test*</span> *with*</p></div>')
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org