Skip to main content

parse_skill_block

Function parse_skill_block 

Source
pub fn parse_skill_block(text: &str) -> Option<ParsedSkillBlock>
Expand description

Parse a <skill name="…" location="…">…</skill> block from message text.

Returns None when text does not start with a skill block. Mirrors the TypeScript regex /^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/.