Commits

Anonymous committed 7fb6cc4

Comment out webhelpers.text.convert_misc_characters: it fails its doctests and
there's no consensus on what it's supposed to do.

Comments (0)

Files changed (4)

   - New exception ``OverwriteError``.
   - Add ``exclude`` argument to ``subclasses_only``.
 
+* webhelpers.text:
+  - Disable ``convert_misc_characters``: it fails its doctests and there's
+    no consensus on what it should do.
+
 1.0b4 (2010-01-24)
 ------------------
 

docs/modules/text.rst

 .. autofunction:: chop_at
 .. autofunction:: collapse
 .. autofunction:: convert_accented_entities
-.. autofunction:: convert_misc_characters
 .. autofunction:: convert_misc_entities
 .. autofunction:: excerpt
 .. autofunction:: lchop
 .. autofunction:: truncate 
 .. autofunction:: urlify
 .. autofunction:: wrap_paragraphs
+
+..
+    Disabled convert_misc_characters(): it fails its doctests, and there's
+    no consensus on what exactly it should do.

docs/whats_new.rst

 
 ``webhelpers.feedgenerator`` was upgraded to the Django original (December 2009
 version), and the "Geo" classes were added for geographical (GIS) feeds.
-There's a flag for latitude/longitude or longitude/latitude format.  Points may
-be in latitude/longitude or longitude/latitude format.  (The default is
-latitude first, but Django and a few others others use longitude first.) A
-``Geometry`` class was reverse engineered for other geometries, but it's
-untested.  Add a "published" property for Atom feeds.
+Points are latitude/longitude by default, but there's a flag if your data is
+longitude first (as Django is). A ``Geometry`` class was reverse engineered for
+other geometries, but it's untested.  Add a "published" property for Atom
+feeds.
 
 webhelpers.html.builder
 +++++++++++++++++++++++
 session structure is different, so delete existing HTTP sessions when
 upgrading.**
 
+webhelpers.text
+++++++++++++++++
+
+``webhelpers.text`` adds a suite of helpers from Ruby's stringex package to
+convert strings to URL-friendly format, and to remove inconvenient accents from
+characters, etc.
+
 webhelpers.util
 +++++++++++++++
 
 ``stylesheet_link()`` that compress their files. It's experimental because
 their tests fail, so they probably don't work.
 
-``webhelpers.text`` contains a suite of helpers from Ruby's stringex package to
-convert strings to URL-friendly format, and to remove inconvenient accents from
-characters, etc.  It's experimental because ``convert_misc_characters()`` has
-bugs: it adds extra spaces, and we're not sure a number-to-word conversion in
-the test suite should be implemented.
-
 Other experiments are in the "unfinished" directory in the source distribution.

webhelpers/text.py

     "chop_at",
     "collapse",
     "convert_accented_entities",
-    "convert_misc_characters",
+    #"convert_misc_characters",   # DISABLED
     "convert_misc_entities",
     "excerpt",
     "lchop",
     s = strip_tags(string)
     s = convert_accented_entities(s)
     s = convert_misc_entities(s)
-    s = convert_misc_characters(s)
+    #s = convert_misc_characters(s)
     if unidecode:
         s = unidecode(s)
     return collapse(s)
     return re.sub(r'\&[^;]+;', '', string)
 
 
+'''*** DISABLED convert_misc_characters: fails doc tests.
+Confirming what behavior should be.
+
 def convert_misc_characters(string):
     """Converts various common plaintext characters to a more
     URI-friendly representation
         s = re.sub(repl, r' %s ' % subst, s)
     s = re.sub(r"(^|\w)'(\w|$)", r'\1\2', s)
     return re.sub(r"[\.\,\:\;\(\)\[\]\/\?\!\^'\"_]", " ", s)
+'''
 
 
 def replace_whitespace(string, replace=" "):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.