MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / blockquote

Function blockquote

crates/chat-cli/src/cli/chat/parse.rs:305–323  ·  view source on GitHub ↗
(
    mut o: impl Write + 'b,
    state: &'b mut ParseState,
)

Source from the content-addressed store, hash-verified

303}
304
305fn blockquote<'a, 'b>(
306 mut o: impl Write + 'b,
307 state: &'b mut ParseState,
308) -> impl FnMut(&mut Partial<&'a str>) -> PResult<(), Error<'a>> + 'b {
309 move |i| {
310 if !state.newline {
311 return Err(ErrMode::from_error_kind(i, ErrorKind::Fail));
312 }
313
314 let level = repeat::<_, _, Vec<&'_ str>, _, _>(1.., terminated(">", space0))
315 .parse_next(i)?
316 .len();
317 let print = "│ ".repeat(level);
318
319 queue(&mut o, StyledText::secondary_fg())?;
320 queue_newline_or_advance(&mut o, state, print.width())?;
321 queue(&mut o, style::Print(print))
322 }
323}
324
325fn bold<'a, 'b>(
326 mut o: impl Write + 'b,

Callers

nothing calls this directly

Calls 3

queueFunction · 0.85
queue_newline_or_advanceFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected