PageRenderTime 6ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/test/macro/syntax.t2t

http://txt2tags.googlecode.com/
Unknown | 46 lines | 39 code | 7 blank | 0 comment | 0 complexity | a62da2cb5aab5cdf151612a93a3f9274 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, WTFPL
  1. %!encoding: UTF-8
  2. %!preproc: '^%%% ' ''
  3. BODYINIT
  4. %%% Syntax: Macro without formatting string
  5. Date : %%date - %%date()
  6. Mtime : %%mtime - %%mtime()
  7. Infile : %%infile - %%infile()
  8. Currentfile : %%currentfile - %%currentfile()
  9. Outfile : %%outfile - %%outfile()
  10. %%% Syntax: Macro name is case insensitive
  11. Date : %%dAtE
  12. Mtime : %%mTiMe
  13. Infile : %%iNfIlE
  14. Currentfile : %%cUrReNtFiLe
  15. Outfile : %%oUtFiLe
  16. %%% Syntax: Macro with formatting string
  17. Date : %%date(txt %C txt)
  18. Mtime : %%mtime(txt %C txt)
  19. Infile : %%infile(txt %e txt)
  20. Currentfile : %%currentfile(txt %e txt)
  21. Outfile : %%outfile(txt %e txt)
  22. %%% Syntax: Leading and trailing spaces are preserved
  23. Date : (%%date( txt )) - (%%date( %C ))
  24. Mtime : (%%mtime( txt )) - (%%mtime( %C ))
  25. Infile : (%%infile( txt )) - (%%infile( %e ))
  26. Currentfile : (%%currentfile( txt )) - (%%currentfile( %e ))
  27. Outfile : (%%outfile( txt )) - (%%outfile( %e ))
  28. %%% Test: Expansion of the percent char
  29. Date : %%date(%) - %%date(%%) - %%date(%%%) - %%date(%%%%)
  30. Mtime : %%mtime(%) - %%mtime(%%) - %%mtime(%%%) - %%mtime(%%%%)
  31. Infile : %%infile(%) - %%infile(%%) - %%infile(%%%) - %%infile(%%%%)
  32. Currentfile : %%currentfile(%) - %%currentfile(%%) - %%currentfile(%%%) - %%currentfile(%%%%)
  33. Outfile : %%outfile(%) - %%outfile(%%) - %%outfile(%%%) - %%outfile(%%%%)
  34. %%% Test: Various per line, glued
  35. Date : %%date(%C)%%date%%date
  36. Mtime : %%mtime(%C)%%mtime%%mtime
  37. Infile : %%infile(%e)%%infile%%infile
  38. Currentfile : %%currentfile(%e)%%currentfile%%currentfile
  39. Outfile : %%outfile(%e)%%outfile%%outfile