Skip to content

Commit 6fff261

Browse files
committed
fix printing
1 parent a0ad9e8 commit 6fff261

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

src/Mapping.m

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -377,23 +377,3 @@ function print_mapping(obj, filename)
377377
end
378378
end
379379

380-
function bf = prepare_for_printing(spec)
381-
382-
if isfield(spec, 'entities') && strcmp(spec.entities, '*')
383-
spec.entities = struct('add', 'joker');
384-
end
385-
bf = bids.File(spec, 'tolerant', true);
386-
387-
if isfield(spec, 'suffix') && isempty(spec.suffix) || ...
388-
~isfield(spec, 'suffix')
389-
bf.suffix = '*';
390-
end
391-
392-
if isfield(spec, 'ext') && ~isempty(spec.ext)
393-
bf.extension = '.*';
394-
end
395-
if ~isfield(spec, 'extension') || isempty(spec.extension)
396-
bf.extension = '.*';
397-
end
398-
399-
end

src/utils/prepare_for_printing.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
%
33
% (C) Copyright 2022 spm_2_bids developers
44

5+
if isfield(spec, 'entities') && strcmp(spec.entities, '*')
6+
spec.entities = struct('add', 'joker');
7+
end
8+
bf = bids.File(spec, 'tolerant', true);
9+
510
if isfield(spec, 'suffix') && isempty(spec.suffix) || ...
611
~isfield(spec, 'suffix')
712
spec.suffix = '*';
@@ -14,5 +19,4 @@
1419
spec.ext = '.*';
1520
end
1621

17-
bf = bids.File(spec);
18-
end
22+
end

0 commit comments

Comments
 (0)