Hi,

I guess you could define a custom filter and then invoke the FILTER directive 
wherever you need it.
The body of the filter could use regular expressions on word boundaries to 
replace quotes; something like this :

sub replace_quotes {
  my $text = shift;
  $text =~ s/"\b/«/g;
  $text =~ s/\b"/»/g;
  return text;
}

Hope this helps,

Laurent Dami

De : templates-boun...@template-toolkit.org 
[mailto:templates-boun...@template-toolkit.org] De la part de Sherwood Botsford
Envoyé : mercredi 23 mars 2016 02:39
À : templates@template-toolkit.org
Objet : [Templates] Smart quotes?


Anyone have a recipe for adding smartypants or equivalent script into the ttree 
script so that the html output has straight quotes replaced with typograper's 
quotes?


Respectfully,

Sherwood of Sherwood's Forests
_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to