forked from pool/python-mistune
Accepting request 289937 from home:netsroth:branches:devel:languages:python
- Add 0001-Fix-when-list-item-is-blank.-Refer-https-github.com-.patch to fix #8 in odpdown, and https://github.com/ipython/ipython/issues/7929. This is a backport from upstream master. OBS-URL: https://build.opensuse.org/request/show/289937 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mistune?expand=0&rev=4
This commit is contained in:
committed by
Git OBS Bridge
parent
22bae2c7d5
commit
c923f85197
@@ -0,0 +1,30 @@
|
||||
From fd8c175668047c82d65f4da7e4ee8ff7900c17d3 Mon Sep 17 00:00:00 2001
|
||||
From: Hsiaoming Yang <me@lepture.com>
|
||||
Date: Wed, 4 Mar 2015 16:14:35 +0800
|
||||
Subject: [PATCH] Fix when list item is blank. Refer
|
||||
https://github.com/ipython/ipython/issues/7929
|
||||
|
||||
---
|
||||
mistune.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mistune.py b/mistune.py
|
||||
index fe50c9d..b361539 100644
|
||||
--- a/mistune.py
|
||||
+++ b/mistune.py
|
||||
@@ -287,8 +287,10 @@ class BlockLexer(object):
|
||||
loose = _next
|
||||
if not loose and re.search(r'\n\n(?!\s*$)', item):
|
||||
loose = True
|
||||
- if i != length - 1:
|
||||
- _next = item[len(item)-1] == '\n'
|
||||
+
|
||||
+ rest = len(item)
|
||||
+ if i != length - 1 and rest:
|
||||
+ _next = item[rest-1] == '\n'
|
||||
if not loose:
|
||||
loose = _next
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 8 20:48:24 UTC 2015 - tbehrens@suse.com
|
||||
|
||||
- Add 0001-Fix-when-list-item-is-blank.-Refer-https-github.com-.patch
|
||||
to fix #8 in odpdown, and
|
||||
https://github.com/ipython/ipython/issues/7929. This is a backport
|
||||
from upstream master.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 7 20:36:53 UTC 2015 - tbehrens@suse.com
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Release: 0
|
||||
Source0: https://pypi.python.org/packages/mistune/mistune-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Url: https://github.com/lepture/mistune
|
||||
# PATCH-FIX-UPSTREAM Fix when list item is blank
|
||||
Patch0: 0001-Fix-when-list-item-is-blank.-Refer-https-github.com-.patch
|
||||
Summary: The fastest markdown parser in pure Python
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
@@ -34,6 +36,7 @@ The fastest markdown parser in pure Python, inspired by marked.
|
||||
|
||||
%prep
|
||||
%setup -q -n mistune-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
||||
Reference in New Issue
Block a user