wayver's git archive


an obsidian renderer
git clone https://git.wayver.dev/sable

sable-markdown/src/parser/inline/footnote_reference.rs@337ba67f65eaa17b44e371af7c0f0c761d6aa914

raw
Date Commit Message Author Files + -
2026-02-23 01:55 initial mvp wayverd 139 17808 0
...

1use nom::{
2    IResult, Parser,
3    bytes::complete::tag,
4    character::complete::{alphanumeric1, char},
5    combinator::map,
6    sequence::delimited,
7};
8
9use crate::ast::Inline;
10
11pub(super) fn footnote_reference<'a>(input: &'a str) -> IResult<&'a str, Inline> {
12    map(
13        delimited(tag("[^"), alphanumeric1, char(']')),
14        |s: &'a str| Inline::FootnoteReference(s.to_owned()),
15    )
16    .parse(input)
17}
18