<commit_before>"""Implementation of SpaceWiki's wikitext syntax"""
import bleach
from flask import url_for
import peewee
import re

from . import links, directives, markdown

TAG_WHITELIST = [
    'ul', 'li', 'ol', 'p', 'table', 'div', 'tr', 'th', 'td', 'em', 'big', 'b',
    'strong', 'a', 'abbr', 'aside', 'audio', 'blockquote', 'br', 'button',
    'code', 'dd', 'del', 'dfn', 'dl', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
    'hr', 'i', 'img', 'ins', 'kbd', 'pre', 's', 'small', 'span', 'sub', 'sup',
    'u', 'video', 'section', 'input', 'form'
]

ATTRIBUTE_WHITELIST = {
    '*': ['style', 'class', 'id', 'tabindex', 'name'],
    'a': ['href'],
    'img': ['src', 'alt'],
    'form': ['action', 'method'],
    'input': ['type', 'placeholder', 'value'],
}

STYLE_WHITELIST = [
    'margin', 'text-align', 'font-weight', 'size', 'color', 'background-color',
    'padding', 'border', 'line-height', 'padding-top', 'float', 'margin-left',
    'position'<commit_msg>wikiformat: whitelist: add colspan, rowspan elements<commit_after>"""Implementation of SpaceWiki's wikitext syntax"""
import bleach
from flask import url_for
import peewee
import re

from . import links, directives, markdown

TAG_WHITELIST = [
    'ul', 'li', 'ol', 'p', 'table', 'div', 'tr', 'th', 'td', 'em', 'big', 'b',
    'strong', 'a', 'abbr', 'aside', 'audio', 'blockquote', 'br', 'button',
    'code', 'dd', 'del', 'dfn', 'dl', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
    'hr', 'i', 'img', 'ins', 'kbd', 'pre', 's', 'small', 'span', 'sub', 'sup',
    'u', 'video', 'section', 'input', 'form'
]

ATTRIBUTE_WHITELIST = {
    '*': ['style', 'class', 'id', 'tabindex', 'name'],
    'td': ['colspan', 'rowspan'],
    'a': ['href'],
    'img': ['src', 'alt'],
    'form': ['action', 'method'],
    'input': ['type', 'placeholder', 'value'],
}

STYLE_WHITELIST = [
    'margin', 'text-align', 'font-weight', 'size', 'color', 'background-color',
    'padding', 'border', 'line-height', 'padding-top', 'float', 'margin-left',
    'position'
{'fraction_non_alphanumeric': 0.2787456445993031, 'fraction_numerical': 0.005973120955699353, 'mean_word_length': 4.598885793871866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4902195', 'n_tokens_mistral': 788, 'n_tokens_neox': 779, 'n_words': 209}