<commit_before>BBCODEPY
========

bbcodepy is a fast Python BBCode parser and renderer.


Usage
-----

All common BBCode tags are supported by default.

``` python
import bbcodepy
print bbcodepy.Parser().to_html('[b]Hello![/b]')
```

Easily add new tags!

``` python
import bbcodepy

class YoutubeTag(bbcode.Tag)
    def to_html(self):
        attributes = {
            'src': self.get_content(true).strip(),
            'width': self.params.get('width', 420)
            'height': self.params.get('height', 315)
        }

        return '<iframe %s frameborder="0" allowfullscreen></iframe>' % self.renderer.html_attributes(attributes)

pareser = bbcodepy.Parser()
parser.register_tag('youtube', YoutubeTag)

print parser.to_html('[youtube width=420 height=315]http://www.youtube.com/embed/rWTa6OKgWlM[/youtube]')
```<commit_msg>error in syntax<commit_after>BBCODEPY
========

bbcodepy is a fast Python BBCode parser and renderer.


Usage
-----

All common BBCode tags are supported by default.

``` python
import bbcodepy
print bbcodepy.Parser().to_html('[b]Hello![/b]')
```

Easily add new tags!

``` python
import bbcodepy

class YoutubeTag(bbcode.Tag)
    def to_html(self):
        attributes = {
            'src': self.get_content(true).strip(),
            'width': self.params.get('width', 420),
            'height': self.params.get('height', 315)
        }

        return '<iframe %s frameborder="0" allowfullscreen></iframe>' % self.renderer.html_attributes(attributes)

pareser = bbcodepy.Parser()
parser.register_tag('youtube', YoutubeTag)

print parser.to_html('[youtube width=420 height=315]http://www.youtube.com/embed/rWTa6OKgWlM[/youtube]')
```
{'fraction_non_alphanumeric': 0.15536892621475704, 'fraction_numerical': 0.016796640671865627, 'mean_word_length': 3.7793696275071635, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1387943', 'n_tokens_mistral': 587, 'n_tokens_neox': 554, 'n_words': 118}