From b3f7622bc8a22a4776216f1a0a58550c0ddd371a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Tue, 2 Apr 2013 09:56:43 +0200 Subject: [PATCH] put comment after soft hyphens and no breaking spaces, so that you do not need an editor that marks them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- ponysay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ponysay.py b/ponysay.py index e75ec478..98d7b6df 100755 --- a/ponysay.py +++ b/ponysay.py @@ -2386,12 +2386,12 @@ class Backend(): if mm + x not in map: # Too much whitespace? cols = 0 break - nbsp = b[map[mm + x]] == ' ' + nbsp = b[map[mm + x]] == ' ' # nbsp m = map[mm + x] - if ('­' in b[bisub : m]) and not nbsp: + if ('­' in b[bisub : m]) and not nbsp: # sort hyphen hyphen = m - 1 - while b[hyphen] != '­': + while b[hyphen] != '­': # sort hyphen hyphen -= 1 while map[mm + x] > hyphen: ## Only looking backward, if foreward is required the word is probabily not hyphenated correctly x -= 1