Support for a list of uppercase words

Bug #604863 reported by mlissner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
titlecase
New
Undecided
Unassigned

Bug Description

I'm using this code on my site, and I need a way of keeping certain words uppercase. We added this support to an older version of titlecase, but now that there have been major updates, we find ourselves busy updating our code again.

I believe the following lines would add support for it:

# at the top under the SMALL variable:
BIG = 'USA|FCC|FTC|DOJ|USC|WTO|EFF|CDT|RSS|LLP|USPS|LLC|CDC|CNMI'

# in the regex list at the top
BIG_WORDS = re.compile(r'^(%s)$' % BIG, re.I)

            # down under the SMALL_WORDS conditional
            if BIG_WORDS.match(word):
                tc_line.append(word.upper())
                continue

It would be fantastic if these or similar lines could be added, since I imagine most people using this will have some things they want capitalized properly.

(sorry for no patch - hopefully this is good enough)

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.