@@ -148,10 +148,9 @@ def __init__(self, restricted=False, lite=False, noimage=False,
148148 self .max_span_depth = 5
149149
150150 # We'll be searching for characters that need to be HTML-encoded to
151- # produce properly valid html.
152- # These are the defaults that work in most cases. Below, we'll copy
153- # this and modify the necessary pieces to make it work for characters
154- # at the beginning of the string.
151+ # produce properly valid html. These are the defaults that work in
152+ # most cases. Below, we'll copy this and modify the necessary pieces
153+ # to make it work for characters at the beginning of the string.
155154 self .glyph_search = [
156155 # apostrophe's
157156 re .compile (r"(^|\w)'(\w)" , re .U ),
@@ -192,7 +191,7 @@ def __init__(self, restricted=False, lite=False, noimage=False,
192191 # plus/minus
193192 re .compile (r'[([]\+\/-[])]' , re .I | re .U ),
194193 # 3+ uppercase acronym
195- re .compile (r'\b([%s%s0-9]{2,})\b(?:[(]([^)]*)[)])' % (upper_re_s , upper_re_s )),
194+ re .compile (r'\b([%s][ %s0-9]{2,})\b(?:[(]([^)]*)[)])' % (upper_re_s , upper_re_s )),
196195 # 3+ uppercase
197196 re .compile (r"""(?:(?<=^)|(?<=\s)|(?<=[>\(;-]))([%s]{3,})(\w*)(?=\s|%s|$)(?=[^">]*?(<|$))""" %
198197 (upper_re_s , self .pnct_re_s )),
0 commit comments