1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00
irssi/utils/clang-format-xs/format-xs-2.pl

11 lines
281 B
Perl
Raw Normal View History

2020-04-28 09:34:47 -04:00
use strict;
use warnings;
my $doc = do { local $/; <> };
$doc =~ s{\}[ \t]*/[*] -xs- [*]/\s*}{}g;
$doc =~ s{^[ \t]*?/[*] =xs= (.*?) [*]/(\s*\{$)?}{$1}gms;
$doc =~ s{^[ \t]*?/[*] clang-format off [*]//[*] =xs= (.*?) [*]/\s?/[*] clang-format on [*]/(\s*\{$)?}{$1}gms;
print $doc;