Dotclear


Ignore:
Timestamp:
09/19/18 10:22:06 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Preserve newlines (LF) in template string in minifier

Location:
build-tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • build-tools/Minifier.php

    r3882 r3883  
    481481                // block below. 
    482482                case "\n": 
    483                     throw new \RuntimeException('Unclosed string at position: ' . $startpos); 
     483                    if ($stringType !== '`') { 
     484                        throw new \RuntimeException('Unclosed string at position: ' . $startpos); 
     485                    } else { 
     486                        echo $this->a; 
     487                    } 
    484488                    break; 
    485489 
  • build-tools/min-js.php

    r3877 r3883  
    2828    fclose($fp); 
    2929} catch (Exception $e) { 
    30     fwrite(STDERR, $e->getMessage() . "\n"); 
     30    fwrite(STDERR, $e->getMessage() . ($js ? "($js)" : '') . "\n"); 
    3131    exit(1); 
    3232} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map