Skip to content

Commit

Permalink
Closes #117
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainhalle committed May 15, 2020
1 parent 4b929cf commit d2fc61c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public List<Advice> evaluate(AnnotatedString s, AnnotatedString original)
{
continue;
}
if (line.substring(start_pos).matches("\\\\captionsetup.*"))
{
// We consider caption, but we ignore captionsetup
continue;
}
boolean period_seen = false;
int level = 0;
for (int i = start_pos + 1; i < line.length(); i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,13 @@ public void test5()
List<Advice> ad_list = rule.evaluate(as, as);
assertEquals(0, ad_list.size());
}

@Test
public void test6()
{
CheckCaptions rule = new CheckCaptions();
AnnotatedString as = AnnotatedString.read(new Scanner("\\captionsetup{whatever}"));
List<Advice> ad_list = rule.evaluate(as, as);
assertEquals(0, ad_list.size());
}
}

0 comments on commit d2fc61c

Please sign in to comment.