Code taken from <http://pjondevelopment.50webs.com/articles/bbcodeParser.html> and slightly modified:

svn r133, git 71e2a7fd3675ddb5f57f9d4c9aecec204b984e6b
<https://github.com/inga-lovinde/FLocal/commit/71e2a7fd3675ddb5f57f9d4c9aecec204b984e6b>
Implemented RequireClosingTag flag for custom-defined elements

git eeae827bf12d943cbc55852c76b773b5554ebb4d
<https://github.com/inga-lovinde/FLocal/commit/eeae827bf12d943cbc55852c76b773b5554ebb4d>
PJonDevelopment refactored to use generic context

git f93fee93ee468b3a950704595988d6d2277d43ad
<https://github.com/inga-lovinde/FLocal/commit/f93fee93ee468b3a950704595988d6d2277d43ad>
PJonDevelopment.BBCode.ITextFormatter refactored to use generic context