casile 0.14.4

The command line interface to the CaSILE toolkit, a book publishing workflow employing SILE and other wizardry
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!@PERL@

# WARNING: This can screw up valid Markdown if there are code snippets. Only
# run on prose that is actually broken and check the results.

use utf8;
use open ':std', ':encoding(UTF-8)';

# Convert lazy double quote entry styles to something sane
while (<>) {
  s#(?<!\s)['‘’`]{3}#'"#g;
  s#['‘’`]{3}(?!\s)#"'#g;
  s#['‘’`]{2}#"#g;
  print;
}