browser: append partial match of next cell versions
[sheet.git] / digraphs.vim.plp
1 <:
2 use 5.014;
3 use warnings;
4 use open IO => ':utf8';
5
6 our $VERSION = 'v1.0';
7
8 $header{content_type} = 'text/plain; charset=us-ascii';
9 say '" vim digraph proposals <http://sheet.shiar.nl/digraphs>';
10 PLP_END { print "\n" };
11
12 open my $include, '<', 'shiar.inc.txt' or do {
13         print qq{\n" $_} for '>>> SERVER ERROR <<<', "($!; try again later)";
14         warn $!;  # log it as well
15         exit;
16 };
17
18 my $init = 1;
19 for (readline $include) {
20         m{^([!"%'-Z_a-z]{2}) (.)} or next;
21         print "\n:digr" if $init;
22         printf ' %s %d', $1, ord $2;
23 }
24 continue {
25         # repeat header for next entry if line was empty
26         $init = !m{\S} unless m{^#};
27 }
28