Skip to content

Commit

Permalink
0.0.33
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jul 29, 2022
1 parent dd2afe7 commit 9ebf7e4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
8 changes: 7 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ Revision history for App-Rak

{{$NEXT}}

0.0.33 2022-07-29T21:33:26+02:00
- Fix issue with multiple matches inside the same paragraph with
--paragraph-context
- Fix issue with #raku, #text and #perl extension groups

0.0.32 2022-07-29T17:23:05+02:00
- Add "paragraph-context" option to show paragraph around match
- Add "paragraph-context" option to show paragraph around match,
Eric de Hont++ for the suggestion

0.0.31 2022-07-28T23:46:56+02:00
- Bump dependency on Git::Blame::File to get latest fixes
Expand Down
2 changes: 1 addition & 1 deletion META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@
],
"test-depends": [
],
"version": "0.0.32"
"version": "0.0.33"
}
18 changes: 10 additions & 8 deletions lib/App/Rak.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ my constant %exts =
'#c' => <c h hdl>,
'#c++' => <cpp cxx hpp hxx>,
'#markdown' => <md markdown>,
'#perl' => ('', <pl pm t>).flat,
'#perl' => ('', <pl pm t>).flat.List,
'#python' => <py>,
'#raku' => ('', <raku rakumod rakutest nqp t pm6 pl6>).flat,
'#raku' => ('', <raku rakumod rakutest nqp t pm6 pl6 t6>).flat.List,
'#ruby' => <rb>,
'#text' => ('', <txt>).flat,
'#text' => ('', <txt>).flat.List,
'#yaml' => <yaml yml>,
;

Expand Down Expand Up @@ -151,12 +151,12 @@ my sub add-paragraph($io, @initially-selected) {
my int $last-linenr = @lines.end;

my int8 @seen;
my @selected = @initially-selected.map: {
my @selected is List = @initially-selected.map: {
my int $linenr = .key;
my int $pos = $linenr;
my $selected := IterationBuffer.CREATE;
while --$pos
&& !@seen.AT-POS($pos)
&& !(@seen.AT-POS($pos)++)
&& @lines.AT-POS($pos) -> $line {
$selected.unshift: Pair.new($pos, $line but delimiter('-'));
}
Expand All @@ -167,13 +167,14 @@ my sub add-paragraph($io, @initially-selected) {
if $linenr < $last-linenr {
$pos = $linenr;
while ++$pos < $last-linenr
&& !@seen.AT-POS($pos)
&& !(@seen.AT-POS($pos)++)
&& @lines.AT-POS($pos) -> $line {
$selected.push:
Pair.new($pos, $line but delimiter('-'));
}
$selected.push:
Pair.new($pos, @lines.AT-POS($pos) but delimiter('-'));
Pair.new($pos, @lines.AT-POS($pos) but delimiter('-'))
unless @seen.AT-POS($pos)++;
}
$selected.Slip
}
Expand Down Expand Up @@ -1530,7 +1531,8 @@ deal to me!
Copyright 2022 Elizabeth Mattijsen
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
This library is free software; you can redistribute it and/or modify it under
the Artistic License 2.0.
=end pod

Expand Down

0 comments on commit 9ebf7e4

Please sign in to comment.