Shlomi Fish avatar Shlomi Fish committed 59f9016

Documentation clarification regarding noBreak.

Comments (0)

Files changed (2)

Text-Format/Text-Format/Changes

 Revision history for Perl extension Text::Format.
 
+0.54 Tue  4 Sep 14:01:10 IDT 2012
+    - Clarified the documentation regarding noBreak and noBreakRegex.
+        - Thanks to Anne Wainwright.
+
 0.53 Fri Jan 28 13:02:01 IST 2011
     - Adopted by Shlomi Fish (while disclaiming all rights).
     - Convert the build system to Module-Build, while adding keywords

Text-Format/Text-Format/lib/Text/Format.pm

 
 =item B<noBreak> 0 || 1 || NOTHING
 
-Set whether you want to use the non-breaking space feature.
+Set whether you want to use the non-breaking space feature (see
+B<noBreakRegex> below).
 
 =item B<noBreakRegex> \%HASH || NOTHING
 
-Pass in a reference to your hash that would hold the regexes on which not
-to break.  Without any arguments, it returns the hash.
-eg.
+Pass in a reference to a hash that would hold the regexes on which not
+to break. In order for this to happen, it requires B<noBreak> to be set
+to B<true> - see above.  Without any arguments, it
+returns the hash. E.g:
 
     {'^Mrs?\.$' => '^\S+$','^\S+$' => '^(?:S|J)r\.$'}
 
 current line then no backtrack is done and the word is stuck on the end.
 This is so you can make a list of names for example.
 
+B<Note>: this feature requires B<noBreak> to be set to true.
+
 =item B<extraSpace> 0 || 1 || NOTHING
 
 Add extra space after end of sentence, normally I<format> would add 1
 justification.  I changed the code to take into account the extra space
 at end of sentence feature.
 
+B<Anne Wainwright>
+
+Inspired a documentation clarification about B<noBreak> required by
+B<noBreakRegex> , thanks to a report with a problem.
+
 =head1 TODO
 
 =cut
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.