mirror of
https://github.com/erkin/ponysay.git
synced 2025-01-31 18:36:43 +01:00
put comment after soft hyphens and no breaking spaces, so that you do not need an editor that marks them
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
8633c265ab
commit
b3f7622bc8
1 changed files with 3 additions and 3 deletions
|
@ -2386,12 +2386,12 @@ class Backend():
|
||||||
if mm + x not in map: # Too much whitespace?
|
if mm + x not in map: # Too much whitespace?
|
||||||
cols = 0
|
cols = 0
|
||||||
break
|
break
|
||||||
nbsp = b[map[mm + x]] == ' '
|
nbsp = b[map[mm + x]] == ' ' # nbsp
|
||||||
m = map[mm + x]
|
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
|
hyphen = m - 1
|
||||||
while b[hyphen] != '':
|
while b[hyphen] != '': # sort hyphen
|
||||||
hyphen -= 1
|
hyphen -= 1
|
||||||
while map[mm + x] > hyphen: ## Only looking backward, if foreward is required the word is probabily not hyphenated correctly
|
while map[mm + x] > hyphen: ## Only looking backward, if foreward is required the word is probabily not hyphenated correctly
|
||||||
x -= 1
|
x -= 1
|
||||||
|
|
Loading…
Reference in a new issue