Searched refs:markup (Results 1 - 25 of 41) sorted by relevance

12

/external/chromium-trace/catapult/catapult_build/
H A Dparse_html.py18 return bs4.BeautifulSoup(markup=contents, features='html5lib')
/external/chromium-trace/catapult/third_party/beautifulsoup4/bs4/tests/
H A Dtest_html5lib.py30 markup = "<p>A <b>bold</b> statement.</p>"
32 soup = self.soup(markup, parse_only=strainer)
34 soup.decode(), self.document_for(markup))
42 markup = ('<table id="1">'
50 markup,
61 markup = '''<?xml version="1.0" encoding="utf-8"?>
70 soup = self.soup(markup)
75 markup = '<p><em>foo</p>\n<p>bar<a></a></em></p>'
76 soup = self.soup(markup)
82 markup
[all...]
H A Dtest_lxml.py70 markup = b"""<?xml version="1.0" encoding="utf-8"?>
76 soup = self.soup(markup)
79 markup.replace(b'\n', b'').replace(
H A Dtest_soup.py106 markup = "No<b>Yes</b><a>No<b>Yes <c>Yes</c></b>"
108 soup = self.soup(markup, parse_only=strainer)
129 self.assertEqual(self.sub.substitute_html(dammit.markup),
238 markup = u'<div><a \N{SNOWMAN}="snowman"></a></div>'
239 self.assertEqual(self.soup(markup).div.encode("utf8"), markup.encode("utf8"))
245 markup = u"I'm already Unicode! \N{SNOWMAN}"
246 dammit = UnicodeDammit(markup)
247 self.assertEqual(dammit.unicode_markup, markup)
250 markup
[all...]
H A Dtest_tree.py8 same markup, but all Beautiful Soup trees can be traversed with the
571 markup = '''<html>
585 markup = re.compile("\n\s*").sub("", markup)
586 self.tree = self.soup(markup)
892 # markup like this to come through. But in general, we don't
1149 markup = '<b a="1" z="5" m="3" f="2" y="4"></b>'
1150 self.assertSoupEquals(markup, '<b a="1" f="2" m="3" y="4" z="5"></b>')
1300 markup = u"<b>&lt;&lt;Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</b>"
1301 soup = self.soup(markup)
[all...]
/external/chromium-trace/catapult/third_party/beautifulsoup4/scripts/
H A Ddemonstrate_parser_differences.py1 """Demonstrate how different parsers parse the same markup.
4 parser should behave more or less the same on valid markup, and
6 parser handles invalid markup differently. Even different versions of
7 the same parser handle invalid markup differently. So instead of unit
11 script tests each line of markup against every parser you have
12 installed, and prints out how each parser sees that markup. This may
35 def __init__(self, markup):
37 self.markup = markup
44 soup = BeautifulSoup(self.markup, parse
[all...]
/external/chromium-trace/catapult/third_party/beautifulsoup4/bs4/
H A Dtesting.py26 def soup(self, markup, **kwargs):
27 """Build a Beautiful Soup object from markup."""
29 return BeautifulSoup(markup, builder=builder, **kwargs)
31 def document_for(self, markup):
36 return self.default_builder.test_fragment_to_document(markup)
52 these tests. With invalid markup, there's room for interpretation,
54 markup in these tests, there's not much room for interpretation.
74 markup = doctype + '\n<p>foo</p>'
75 soup = self.soup(markup)
106 markup
[all...]
H A D__init__.py56 feed(markup)
80 def __init__(self, markup="", features=None, builder=None,
83 provided markup (which can be a string or a file-like object)
97 "for any necessary markup massage.")
160 if hasattr(markup, 'read'): # It's a file-type object.
161 markup = markup.read()
162 elif len(markup) <= 256:
164 # involving passing non-markup to Beautiful Soup.
165 # Beautiful Soup will still parse the input as markup,
[all...]
H A Ddammit.py215 def __init__(self, markup, override_encodings=None, is_html=False):
222 self.markup, self.sniffed_encoding = self.strip_byte_order_mark(markup)
234 """Yield a number of encodings that might work for this markup."""
249 self.markup, self.is_html)
256 self.chardet_encoding = chardet_dammit(self.markup)
289 def find_declared_encoding(cls, markup, is_html=False, search_entire_document=False):
298 xml_endpos = html_endpos = len(markup)
301 html_endpos = max(2048, int(len(markup) * 0.05))
304 declared_encoding_match = xml_encoding_re.search(markup, endpo
[all...]
H A Delement.py45 When Beautiful Soup parses the markup '<meta charset="utf8">', the
61 When Beautiful Soup parses the markup:
175 # used on HTML markup.
1418 """Encapsulates a number of ways of matching a markup element (tag or
1486 markup = None
1488 markup = markup_name
1489 markup_attrs = markup
1496 or (markup and self._matches(markup, self.name))
1497 or (not markup an
[all...]
/external/chromium-trace/catapult/third_party/beautifulsoup4/bs4/builder/
H A D_lxml.py72 def prepare_markup(self, markup, user_specified_encoding=None,
76 (markup, encoding, declared encoding,
81 if isinstance(markup, unicode):
84 yield markup, None, document_declared_encoding, False
86 if isinstance(markup, unicode):
89 yield (markup.encode("utf8"), "utf8",
98 detector = EncodingDetector(markup, try_encodings, is_html)
100 yield (detector.markup, encoding, document_declared_encoding, False)
102 def feed(self, markup):
103 if isinstance(markup, byte
[all...]
H A D_htmlparser.py138 def prepare_markup(self, markup, user_specified_encoding=None,
141 :return: A 4-tuple (markup, original encoding, encoding
142 declared within markup, whether any characters had to be
145 if isinstance(markup, unicode):
146 yield (markup, None, None, False)
150 dammit = UnicodeDammit(markup, try_encodings, is_html=True)
151 yield (dammit.markup, dammit.original_encoding,
155 def feed(self, markup):
160 parser.feed(markup)
167 # 3.2.3 code. This ensures they don't treat markup lik
[all...]
H A D__init__.py104 The final markup may or may not actually present this tag as
122 def feed(self, markup):
125 def prepare_markup(self, markup, user_specified_encoding=None,
127 return markup, None, None, False
178 def feed(self, markup):
H A D_html5lib.py27 def prepare_markup(self, markup, user_specified_encoding):
30 yield (markup, None, None, False)
33 def feed(self, markup):
37 doc = parser.parse(markup, encoding=self.user_specified_encoding)
40 if isinstance(markup, unicode):
/external/llvm/lib/Target/X86/InstPrinter/
H A DX86ATTInstPrinter.cpp37 OS << markup("<reg:") << '%' << getRegisterName(RegNo) << markup(">");
169 O << markup("<imm:") << '$' << formatImm((int64_t)Op.getImm())
170 << markup(">");
181 O << markup("<imm:") << '$';
183 O << markup(">");
194 O << markup("<mem:");
221 O << ',' << markup("<imm:") << ScaleVal // never printed in hex.
222 << markup(">");
228 O << markup(">");
[all...]
/external/llvm/lib/Target/ARM/InstPrinter/
H A DARMInstPrinter.cpp66 OS << markup("<reg:") << getRegisterName(RegNo) << markup(">");
156 O << ", " << markup("<imm:") << "#"
157 << translateShiftImm(ARM_AM::getSORegOffset(MO2.getImm())) << markup(">");
326 O << markup("<imm:") << '#' << formatImm(Op.getImm()) << markup(">");
368 O << markup("<mem:") << "[pc, ";
377 O << markup("<imm:") << "#-" << formatImm(-OffImm) << markup(">");
379 O << markup("<im
[all...]
/external/chromium-trace/catapult/third_party/Paste/paste/util/
H A DPySourceColor.py17 - HTML markup does not create w3c valid html, but it works on every
19 - CSS markup is w3c validated html 4.01 strict,
21 - XHTML markup is w3c validated xhtml 1.0 strict,
28 -Three types of markup:
65 html markup converts all to raw (TEXT token)
81 HTML markup functions will ignore these.
123 convert('c:/Python22/Lib', colors=lite, markup="css",
160 convert(sys.argv[1], './xhtml.html', colors=new, markup='xhtml', show=1,
162 convert(sys.argv[1], './html.html', colors=new, markup='html', show=1,
235 # markup classnam
[all...]
/external/autotest/site_utils/rpm_control_system/
H A DBeautifulSoup.py111 # First, the classes that represent markup elements.
890 """Encapsulates a number of ways of matching a markup element (tag or
915 markup = None
917 markup = markupName
918 markupAttrs = markup
924 or (markup and self._matches(markup, self.name)) \
925 or (not markup and self._matches(markupName, self.name)):
944 if markup:
945 found = markup
[all...]
/external/owasp/sanitizer/src/tests/org/owasp/html/
H A DHtmlLexerTest.java148 private static void assertTokens(String markup, String... golden) { argument
149 HtmlLexer lexer = new HtmlLexer(markup);
153 actual.add(t.type + ": " + markup.substring(t.start, t.end));
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
H A DScientificNumberFormatterTest.java29 ScientificNumberFormatter markup = ScientificNumberFormatter.getMarkupInstance(
35 markup.format(1.23456e-78));
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
H A DScientificNumberFormatterTest.java25 ScientificNumberFormatter markup = ScientificNumberFormatter.getMarkupInstance(
31 markup.format(1.23456e-78));
/external/llvm/include/llvm/MC/
H A DMCInstPrinter.h86 StringRef markup(StringRef s) const;
87 StringRef markup(StringRef a, StringRef b) const;
/external/llvm/lib/MC/
H A DMCInstPrinter.cpp55 StringRef MCInstPrinter::markup(StringRef s) const { function in class:MCInstPrinter
61 StringRef MCInstPrinter::markup(StringRef a, StringRef b) const { function in class:MCInstPrinter
/external/chromium-trace/catapult/third_party/gsutil/third_party/httplib2/
H A Dref.tex1 % Complete documentation on the extended LaTeX markup used for Python
63 %The \code{\e appendix} markup need not be repeated for additional
/external/icu/icu4j/tools/build/src8/com/ibm/icu/dev/tool/docs/
H A DICUTagletAdapter.java11 import com.sun.tools.doclets.formats.html.markup.RawHtml;

Completed in 662 milliseconds

12