diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2016-02-04 19:47:41 -0500 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2016-02-04 19:47:41 -0500 |
| commit | c25f5fefbfdcbee15685778dcf25b82849e0d617 (patch) | |
| tree | d23e78f9d01bea02366bff427af773224b8254b8 | |
| parent | 871c61c6b4351d4a9dd78ba1d70d6e1af8ffe1e7 (diff) | |
| download | anonbib-c25f5fefbfdcbee15685778dcf25b82849e0d617.tar.gz | |
_split --> utils.py
| -rw-r--r-- | BibTeX.py | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -225,28 +225,6 @@ def sortEntriesByDate(entries): -def _split(s,w=79,indent=8): - r = [] - s = re.sub(r"\s+", " ", s) - first = 1 - indentation = "" - while len(s) > w: - for i in xrange(w-1, 20, -1): - if s[i] == ' ': - r.append(indentation+s[:i]) - s = s[i+1:] - break - else: - r.append(indentation+s.strip()) - s = "" - if first: - first = 0 - w -= indent - indentation = " "*indent - if (s): - r.append(indentation+s) - r.append("") - return "\n".join(r) class FileIter: def __init__(self, fname=None, file=None, it=None, string=None): |
