Lines Matching refs:wbr
27 # Monkey-patch BS4. WBR element must not have an end tag.
28 bs4.builder.HTMLTreeBuilder.empty_element_tags.add("wbr")
1246 def wbr(text):
1248 Insert word break hints for the browser in the form of <wbr> HTML tags.
1261 A string with <wbr> inserted by the above rules.
1269 # for johnyOrange.appleCider.redGuardian also insert wbr before the caps
1270 # => johny<wbr>Orange.apple<wbr>Cider.red<wbr>Guardian
1275 new_word = re.sub(r"([a-z])([A-Z])", r"\1<wbr>\2", words)
1278 # e.g. X/Y/Z -> X/<wbr>Y/<wbr>/Z. also for X.Y.Z, X_Y_Z.
1279 new_txt = re.sub(SPLIT_CHARS, r"\1<wbr>", new_txt)
1286 wbr_tag = lambda: soup.new_tag('wbr') # must generate new tag every time
1291 # Insert each '$text<wbr>$foo' before the old '$text$foo'
1292 split_by_wbr_list = wbr_filter(navigable_string).split("<wbr>")