© ElasticThreads and Brett Terpstra, 2011
+ +based on NV 2.0 β4 +Copyright © 2011 Zachary Schneirov
+ +All Rights Reserved.
+He said, "'Quoted' words in a larger quote."
- s/"'(?=\w)/»‚/g; - s/'"(?=\w)/‚»/g; + s/"'(?=\w)/„‚/g; + s/'"(?=\w)/‚„/g; # Special case for decade abbreviations (the '80s): s/'(?=\d{2}s)/’/g; @@ -520,7 +520,7 @@ sub EducateQuotes { ) " # the quote (?=\w) # followed by a word character - } {$1»}xg; + } {$1„}xg; # Double closing quotes: s { @@ -528,10 +528,10 @@ sub EducateQuotes { " (?(1)|(?=\s)) # If $1 captured, then do nothing; # if not, then make sure the next char is whitespace. - } {$1«}xg; + } {$1“}xg; # Any remaining quotes should be opening ones. - s/"/»/g; + s/"/„/g; return $_; } @@ -544,12 +544,12 @@ sub EducateBackticks { # translated into HTML curly quote entities. # # Example input: ``Isn't this fun?'' -# Example output: »Isn't this fun?« +# Example output: „Isn't this fun?“ # local $_ = shift; - s/``/»/g; - s/''/«/g; + s/``/„/g; + s/''/“/g; return $_; } @@ -648,7 +648,7 @@ sub StupefyEntities { # Returns: The string, with each SmartyPants HTML entity translated to # its ASCII counterpart. # -# Example input: »Hello — world.« +# Example input: „Hello — world.“ # Example output: "Hello -- world." # @@ -660,8 +660,8 @@ sub StupefyEntities { s/‚/'/g; # open single quote s/‘/'/g; # close single quote - s/»/"/g; # open double quote - s/«/"/g; # close double quote + s/„/"/g; # open double quote + s/“/"/g; # close double quote s/…/.../g; # ellipsis @@ -1017,7 +1017,7 @@ =head1 VERSION HISTORY smarty_pants="-1" SmartyPants will perform reverse transformations, turning HTML - entities into plain ASCII equivalents. E.g. "»" is turned + entities into plain ASCII equivalents. E.g. "„" is turned into a simple double-quote ("), "—" is turned into two dashes, etc. This is useful if you are using SmartyPants from Brad Choate's MT-Textile text filter, but wish to suppress smart diff --git a/NSBezierPath_NV.h b/NSBezierPath_NV.h new file mode 100644 index 00000000..f54cd336 --- /dev/null +++ b/NSBezierPath_NV.h @@ -0,0 +1,28 @@ +// +// NSBezierPath_NV.h +// Notation +// +// Created by Zachary Schneirov on 1/14/11. + +/*Copyright (c) 2010, Zachary Schneirov. All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted + provided that the following conditions are met: + - Redistributions of source code must retain the above copyright notice, this list of conditions + and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of + conditions and the following disclaimer in the documentation and/or other materials provided with + the distribution. + - Neither the name of Notational Velocity nor the names of its contributors may be used to endorse + or promote products derived from this software without specific prior written permission. */ + + +#import