Analyser/Is_ListItem_Start [ Functions ]
FUNCTION
Test if a line starts with something that indicates a list item. List items start with '*', '-', or 'o'. SYNPOPSIS
INPUTS
- line -- the line
RESULT
- TRUE -- it did start with one of those characters
- FALSE -- it did not.
SOURCE
{ char *c = arg_line; int cur_indent = Get_Indent( arg_line ); if ( cur_indent == arg_indent ) { /* TODO Think there is a function for this */ for ( ; *c && utf8_isspace( *c ); ++c ) { /* empty */ }; if ( *c && ( strlen( c ) >= 3 ) ) { if ( strchr( "*-o", *c ) && utf8_isspace( *( c + 1 ) ) ) { return TRUE; } } } else { /* The line is indented so it must be * the start of a pre block */ } return FALSE; }