Function parse_tag

Source
pub fn parse_tag(input: &str) -> IResult<&str, String>
Expand description

Parse a tag from a string.

This function parses tagged content enclosed in angle brackets. Tags are used in the AIM language for formatting special types and inference responses.

§Arguments

  • input - A string slice containing the tag to parse

§Returns

  • IResult<&str, String> - A nom result with remaining input and parsed tag content

§Examples

use aimx::literals::text::parse_tag;
 
assert_eq!(parse_tag("<bold>"), Ok(("", "bold".to_string())));
assert_eq!(parse_tag("<format:date>"), Ok(("", "format:date".to_string())));