pub enum CodeRules {
CommonMark,
SkillExport,
}Expand description
Which rules the lexer follows. See the module doc.
§Examples
use markdown_link::code::{CodeRules, strip_code_with};
// A longer backtick run closes a shorter span under `SkillExport` only.
// (It closes with the first backtick of the run; the rest stays.)
let text = "`a`` b";
assert_eq!(strip_code_with(text, CodeRules::CommonMark), text);
assert_eq!(strip_code_with(text, CodeRules::SkillExport), " ` b");
assert_eq!(CodeRules::default(), CodeRules::CommonMark);Variants§
CommonMark
CommonMark’s rules.
SkillExport
The looser rules of some agent-skill renderers. See the module doc.
Trait Implementations§
impl Copy for CodeRules
impl Eq for CodeRules
impl StructuralPartialEq for CodeRules
Auto Trait Implementations§
impl Freeze for CodeRules
impl RefUnwindSafe for CodeRules
impl Send for CodeRules
impl Sync for CodeRules
impl Unpin for CodeRules
impl UnsafeUnpin for CodeRules
impl UnwindSafe for CodeRules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more