Skip to content

Replace {rdelim} and {ldelim} for { and } or viceversa from smarty templates

License

Notifications You must be signed in to change notification settings

falmar/smarty-brace-delim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smarty-brace-delim

Status Codecov

Replace {rdelim} and {ldelim} Smarty braces delimiters for real braces { and } or viceversa from Smarty templates

Install

$ go get github.com/falmar/smarty-brace-delim

Usage

$ smarty-brace-delim -h
Usage of smarty-brace-delim:
  -b	Parse braces into {delim}
  -d	Parse {delim} into braces
  -i string
    	Input file path
  -o string
    	Output file path absolute or relative (to input) NOTE: if not provied will overwrite input file
  -ow
    	Overwrite backup file if already exist
  -rm
    	Remove backup file after parse

Test

$ go test github.com/falmar/smarty-brace-delim -v -cover

Examples

Using option -b

$ smarty-brace-delim -i path/to/file -o path/to/output_file -b

Will transform the input file into output file

Using the option -d will do the opposite

TODO

  • Take care of fragments multiline comments eg. function { {* comment *} }

About

Replace {rdelim} and {ldelim} for { and } or viceversa from smarty templates

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published