About Super Smartypants
Super Smartypants is a replacement for Smartypants core which adds language support and fine-tuned configuration for each language.
Textformatter modules that provide run-time formatting for blocks of text (typically used with Text/Textarea fields).
Should be safe for use in production environments. *
|Compatibility||2.4, 2.5, 2.6, 2.7|
|Date Added||June 21, 2014|
|Last Updated||May 11, 2015|
This module's files should be placed in /site/modules/TextformatterSuperSmartypants/
How to install or uninstall modules
Super Smartypants is a ProcessWire textformatter module which adds support for languages. It also allows you to set the different Smartypants Typographer parser attributes to customize which rules apply and fixes some bugs.
After installation, add /site/modules/TextformatterSuperSmartypants/smartypants.php to your language translations.
To enable Super Smartypants for a language, set the Smartypants attributes field to 1 (or see below for details), otherwise to disable leave the field empty.
Change default strings according to your masterful typographic knowledge.
These attributes can be inserted in the Smartypants attributes field. Note that attributes 1, 2, 3 do not mix with individual settings (you cannot do 1:+ for example). This is a limitation from the original Smartypants code, there is no plan to improve this right now.
leave empty : do nothing
1 ⇒ set all, except dash spacing
2 ⇒ except dash spacing, using old school en- and em- dash shortcuts
3 ⇒ except dash spacing, using inverted old school en and em- dash shortcuts
q ⇒ quotes
b ⇒ backtick quotes (``double'' only)
B ⇒ backtick quotes (``double'' and `single')
c ⇒ comma quotes (,,double`` only)
g ⇒ guillemets (<<double>> only)
d ⇒ dashes ("--" for em-dashes; no en-dash support)
D ⇒ old school dashes ("---" for em-dashes; "--" for en-dashes)
i ⇒ inverted old school dashes ("--" for em-dashes; "---" for en-dashes)
e ⇒ ellipses
You can add a plus sign after some of these options denoted by + to add the space when it is not already present, or you can add a minus sign to completly remove any space present. For example, use :+ to add spacing before colons, and inversely :- to remove them.
: ⇒ colon spacing (optional additional + or -)
; ⇒ semicolon spacing (optional additional + or -)
m ⇒ question and exclamation marks spacing (optional additional + or -)
h ⇒ em-dash spacing (optional additional + or -)
H ⇒ en-dash spacing (optional additional + or -)
f ⇒ french quote spacing (optional additional + or -)
t ⇒ thousand separator spacing (optional additional -) Note that this doesn't add spaces when there are none, it only converts them
u ⇒ unit spacing (optional additional + or -)
⇒ Regular (breaking) space
⇒ Non-breaking space
⇒ En space
⇒ Em space
⇒ Three-per-em space
⇒ Four-per-em space
⇒ Thin space
⇒ Narrow no-break space
⇒ Hair space
« («) ⇒ Left-pointing double guillemets
» (») ⇒ Right-pointing double guillemets
‹ (‹) ⇒ Left-pointing single guillemets
› (›) ⇒ Right-pointing single guillemets
The MIT License (MIT)
Copyright (c) 2014 Pierre-Luc Auclair
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No comments yet. Be the first to post!
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- Input Fields
- Language Modules
- Language Packs
- Markup Generation
- Premium Modules
- Process Modules
- Proof of Concept
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.