lib/scripts/fixdots.pl
changeset 3838 a16277522928
parent 3826 0caedb36900d
child 4076 8315021bf7d6
equal deleted inserted replaced
3837:d7f033c74b38 3838:a16277522928
    19     $rest = $text;
    19     $rest = $text;
    20 
    20 
    21     while (1) {
    21     while (1) {
    22 	$_ = $rest;
    22 	$_ = $rest;
    23 	($pre, $str, $rest) =
    23 	($pre, $str, $rest) =
    24 	    m/^((?: \(\*.*?\*\) | [^"] )*)     # pre: text or (non-nested!) comments
    24 	    m/^((?: \(\*.*?\*\) | [^"] )*)      # pre: text or (non-nested!) comments
    25             "((?: [^"\\] | \\\S | \\\s+\\ )*)"  # quoted string
    25             "((?: [^"\\] | \\\S | \\\s+\\ )*)"  # quoted string
    26             (.*)$/sx;                          # rest of file
    26             (.*)$/sx;                           # rest of file
    27 	if ($str) {
    27 	if ($str) {
    28 	    $_ = $str;
    28 	    $_ = $str;
    29 	    if (!m/^[a-zA-Z0-9_\/\.]*$/s && !m/\.ML/s && !m/\.thy/s) {   # exclude filenames!
    29 	    if (!m/^[a-zA-Z0-9_\/\.]*$/s && !m/\.ML/s && !m/\.thy/s) {   # exclude filenames!
    30 		s/([a-zA-Z][a-zA-Z0-9_']*)\.([a-zA-Z])/$1\. $2/sg;
    30 		s/([a-zA-Z][a-zA-Z0-9_']*)\.([a-zA-Z])/$1\. $2/sg;
    31 	    }
    31 	    }