Indefero

Indefero Commit Details


Date:2011-10-08 17:55:42 (13 years 6 months ago)
Author:Thomas Keller
Branch:develop, feature.diff-whitespace, feature.wiki-default-page, release-1.2, release-1.3
Commit:7438a2bf19c10f18f112698435e8f962835795f9
Parents: 2e0995abac2175f1f77de7f47930d8996236d7d6
Message:Improve the rendering of the control characters greatly by using the Unicode counterparts in th 0x24## plane and add a little bit of explanation what we are doing there and why we are doing this.

Changes:

File differences

src/IDF/Diff.php
247247
248248
249249
250
251
252
253
254
255
256
257
250258
251
259
252260
253261
254262
    private static function makeNonPrintableCharsVisible($line)
    {
        // This translates most of the C0 ASCII control characters into
        // their visual counterparts in the 0x24## unicode plane
        // (http://en.wikipedia.org/wiki/C0_and_C1_control_codes).
        // We could add DEL (0x7F) to this set, but unfortunately this
        // is not nicely mapped to 0x247F in the control plane, but 0x2421
        // and adding an if expression below just for this is a little bit
        // of a hassle. And of course, the more esoteric ones from C1 are
        // missing as well...
        return preg_replace('/([\x00-\x1F])/ue',
                            '"<span class=\"non-printable\" title=\"0x".strtoupper(bin2hex("\\1"))."\">".bin2hex("\\1")."</span>"',
                            '"<span class=\"non-printable\" title=\"0x".bin2hex("\\1")."\">&#x24".bin2hex("\\1")."</span>"',
                            $line);
    }
www/media/idf/css/style.css
663663
664664
665665
666
667
668666
669667
670668
  color: white;
  text-transform: uppercase;
  float: none;
  font-size: 5.5pt;
  font-family: Calibri, Helvetica, Arial, sans-serif;
  text-align: center;
  display: inline-block;
  padding: 1px 1px 0px 1px;

Archive Download the corresponding diff file

Page rendered in 0.14826s using 13 queries.