Template:FormatName: Difference between revisions

mNo edit summary
No edit summary
Line 1: Line 1:
{{#lua:
{{#lua:
   name = stdin:match("[^. ]+")
   name = stdin:match("[^&]+")
  name = string.gsub( name, " alpha%-", " α-" )
  name = string.gsub( name, " beta%-", " β-" )
  name = string.gsub( name, " gamma%-", " γ-" )
  name = string.gsub( name, " delta%-", " δ-" )
  name = string.gsub( name, " Delta%-", " Δ-" )
  name = string.gsub( name, "_([%d]) ", "<sub>%1</sub> " )
   print(name)
   print(name)
|{{{1|foo}}}}}
|{{{1|foo Delta-foo_2 fdol}}}}}

Revision as of 08:11, 19 January 2010

{{#lua:

 name = stdin:match("[^&]+")
 name = string.gsub( name, " alpha%-", " α-" )
 name = string.gsub( name, " beta%-", " β-" )
 name = string.gsub( name, " gamma%-", " γ-" )
 name = string.gsub( name, " delta%-", " δ-" )
 name = string.gsub( name, " Delta%-", " Δ-" )
 name = string.gsub( name, "_([%d]) ", "%1 " )
 print(name)

|foo Delta-foo_2 fdol}}