diff --git a/org_mode_samples/object/timestamp/all_repeater_warning_delay_mark.org b/org_mode_samples/object/timestamp/all_repeater_warning_delay_mark.org new file mode 100644 index 0000000..2e9a867 --- /dev/null +++ b/org_mode_samples/object/timestamp/all_repeater_warning_delay_mark.org @@ -0,0 +1,7 @@ +# All the marks for repeater and warning delay +[1970-01-01 Thu 8:15-13:15foo +1h -2h] +[1970-01-01 Thu 8:15-13:15foo ++1d -2d] +[1970-01-01 Thu 8:15-13:15foo .+1w -2w] +[1970-01-01 Thu 8:15-13:15foo +1m --2m] +[1970-01-01 Thu 8:15-13:15foo ++1y --2y] +[1970-01-01 Thu 8:15-13:15foo .+1d --2h] diff --git a/src/parser/timestamp.rs b/src/parser/timestamp.rs index 2fa5a04..e34598b 100644 --- a/src/parser/timestamp.rs +++ b/src/parser/timestamp.rs @@ -534,8 +534,8 @@ fn repeater<'b, 'g, 'r, 's>( // ++ for catch-up type // .+ for restart type let (remaining, repeater_type) = alt(( - map(tag("++"), |_| RepeaterType::Cumulative), - map(tag("+"), |_| RepeaterType::CatchUp), + map(tag("++"), |_| RepeaterType::CatchUp), + map(tag("+"), |_| RepeaterType::Cumulative), map(tag(".+"), |_| RepeaterType::Restart), ))(input)?; let (remaining, value) = digit1(remaining)?;