jbowens / jBBCode

A lightweight but extensible BBCode parser
http://jbbcode.com
MIT License
164 stars 32 forks source link

Tag option parsing flaws #34

Open Dijky opened 9 years ago

Dijky commented 9 years ago

While working on #33 I noticed some inconsistencies in ending a tag option and proceeding to the next one:

I can make a pull request once #33 has been decided, so the merges will not conflict.

I would also like to add single-quoted values ([tag opt='use " in here without problem']) and possibly backslash-escaping ([tag opt="this: \" is a double quote"]).

Another problem is using ] in a (quoted) tag option. Due to the current parser implementation this is impossible.
After all, the parser is not a complete DFSM since the tokenizer only knows [, ], and everything else as tokens.

shmax commented 9 years ago

@Dijky, how are you coming on this?