(
mut o: impl Write + 'b,
state: &'b mut ParseState,
)
| 395 | } |
| 396 | |
| 397 | fn citation<'a, 'b>( |
| 398 | mut o: impl Write + 'b, |
| 399 | state: &'b mut ParseState, |
| 400 | ) -> impl FnMut(&mut Partial<&'a str>) -> PResult<(), Error<'a>> + 'b { |
| 401 | move |i| { |
| 402 | let num = delimited("[[", digit1, "]]").parse_next(i)?; |
| 403 | let link = delimited("(", take_till(0.., ')'), ")").parse_next(i)?; |
| 404 | |
| 405 | state.citations.push((num.to_owned(), link.to_owned())); |
| 406 | |
| 407 | queue_newline_or_advance(&mut o, state, num.width() + 1)?; |
| 408 | queue(&mut o, StyledText::info_fg())?; |
| 409 | queue(&mut o, style::Print(format!("[^{num}]")))?; |
| 410 | queue(&mut o, StyledText::reset()) |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | fn url<'a, 'b>( |
| 415 | mut o: impl Write + 'b, |
nothing calls this directly
no test coverage detected