Skip to content

Commit

Permalink
Skip multiline comments when checking if test/example is capturable
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Oct 31, 2024
1 parent eed5da6 commit d110798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions M2/Macaulay2/m2/examples.m2
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ isCapturable = (inputs, pkg, isTest) -> (
-- alternatively, no-capture-flag can be used with an example or test
if argumentMode & NoCapture =!= 0 or match("no-capture-flag", inputs) then return false;
-- strip commented segments first
inputs = replace("--.*$", "", inputs);
inputs = replace("-\\*.*?\\*-", "", inputs);
inputs = replace("--.*$", "", inputs);
inputs = replace("-\\*(.|\n)*?\\*-", "", inputs);
-- TODO: remove this when the effects of capture on other packages is reviewed
(isTest or match({"FirstPackage", "Macaulay2Doc"}, pkg#"pkgname"))
and not match({
Expand Down

0 comments on commit d110798

Please sign in to comment.