[fix] open/close tag setting is not working

fix code and test code
Merge pull request #6 from zedgu/master

[fix] open/close tag setting is not working