Skip to content

Commit

Permalink
Improved the Known Issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
mudge committed May 22, 2008
1 parent e3f8929 commit c86810d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.markdown
Expand Up @@ -21,7 +21,7 @@ From the command-line:
Known Issues
------------

It will not properly handle non-ASCII printable characters such as é.
Unlike the original Perl implementation, this version does not correctly capitalise characters such as é and is therefore limited in scope to strings consisting only of [ASCII](http://en.wikipedia.org/wiki/Ascii) printable characters. A workaround would be to stop relying on the Ruby regular expression patterns of `[A-Z]`, `\w` and `\W` for detecting capital letters, alphanumeric characters and non-alphanumeric characters respectively.

While it will deal with most common usage where you need a reasonably-correctly-cased sentence to be made suitable for a title, it will not correct mistakes such as lowercase acronyms or errant capital letters:

Expand Down
2 changes: 2 additions & 0 deletions title_case.rb
Expand Up @@ -83,6 +83,8 @@ def title_case
input = ARGV.first || STDIN.read

if input.empty?

# If no input was given, print simple usage instructions
puts "usage: ruby title_case.rb [TEXT_TO_TITLE_CASE]"
else
puts input.title_case
Expand Down

0 comments on commit c86810d

Please sign in to comment.