MCPcopy Create free account
hub / github.com/untitaker/hyperlink / new

Method new

src/html/parser.rs:155–178  ·  view source on GitHub ↗
(
        arena: &'a Bump,
        document: &'d Document,
        buffers: &'d mut ParserBuffers,
        scratch: &'d mut String,
        link_buf: &'d mut Vec<Link<'a, VoidParagraph>>,
        chec

Source from the content-addressed store, hash-verified

153 F: FnMut(Link<'a, P::Paragraph>),
154{
155 pub fn new(
156 arena: &'a Bump,
157 document: &'d Document,
158 buffers: &'d mut ParserBuffers,
159 scratch: &'d mut String,
160 link_buf: &'d mut Vec<Link<'a, VoidParagraph>>,
161 check_anchors: bool,
162 callback: F,
163 ) -> Self {
164 HyperlinkEmitter {
165 extractor: LinkExtractor {
166 paragraph_walker: P::new(),
167 arena,
168 document,
169 link_buf,
170 scratch,
171 in_paragraph: false,
172 check_anchors,
173 callback,
174 },
175 buffers,
176 current_tag_is_closing: false,
177 }
178 }
179
180 fn flush_old_attribute(&mut self) {
181 let value = self.buffers.current_attribute_value.as_slice();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected