Commits

Anonymous committed 2ef7c2b

Commit.

  • Participants
  • Parent commits f43f110

Comments (0)

Files changed (2)

File bin/convert-wml-to-unicode-apostrophies.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use IO::All;
+
+use utf8;
+
+binmode STDIN, ":utf8";
+binmode STDOUT, ":utf8";
+
+my $content = io('-')->slurp();
+
+sub to_unicode
+{
+    my ($s) = @_;
+
+    $s =~ tr/'/’/;
+
+    return $s;
+}
+
+$content =~ s{\b(I'd|I'll|it's|they're|you're|we'll|we'd|wasn't|weren't|aren't|Here's)\b}{to_unicode($1)}egi;
+
+print $content;

File bin/find-ascii-quotes.vim

+function! Find_next()
+    while (search("[\"']", 'W') != 0)
+        if (synID(line("."), col("."), 1) == 0)
+            return
+        endif
+    endwhile
+endfunction
+
+map <F2> :call Find_next()<CR>