correct invalid void tags
This commit is contained in:
@@ -6,7 +6,7 @@ from pygments.lexers import get_lexer_by_name
|
||||
from pygments.util import ClassNotFound as PygmentsClassNotFound
|
||||
import re
|
||||
|
||||
BABYCODE_VERSION = 7
|
||||
BABYCODE_VERSION = 8
|
||||
|
||||
class BabycodeError(Exception):
|
||||
pass
|
||||
@@ -441,15 +441,15 @@ RSS_TAGS = {
|
||||
VOID_TAGS = {
|
||||
'lb': lambda attr: '[',
|
||||
'rb': lambda attr: ']',
|
||||
'@': lambda attr: '@',
|
||||
'-': lambda attr: '-',
|
||||
'at': lambda attr: '@',
|
||||
'd': lambda attr: '-',
|
||||
}
|
||||
|
||||
# [img] is considered block for the purposes of collapsing whitespace,
|
||||
# despite being potentially inline (since the resulting <img> tag is inline, but creates a block container around itself and sibling images).
|
||||
# [code] has a special case in is_inline().
|
||||
INLINE_TAGS = {
|
||||
'b', 'i', 's', 'u', 'color', 'big', 'small', 'url', 'lb', 'rb', '@'
|
||||
'b', 'i', 's', 'u', 'color', 'big', 'small', 'url', 'lb', 'rb', 'at', 'd'
|
||||
}
|
||||
|
||||
def is_tag(e, tag=None):
|
||||
|
||||
Reference in New Issue
Block a user