Skip to content
Snippets Groups Projects
  1. May 16, 2018
  2. Apr 04, 2018
  3. Nov 09, 2016
  4. Nov 08, 2016
  5. Nov 03, 2016
  6. Sep 27, 2016
  7. Mar 10, 2016
  8. Mar 09, 2016
  9. Feb 04, 2016
    • Daniel Martin's avatar
      Improve lexer with better string handling and grouping parens/brackets · 34f90e69
      Daniel Martin authored
      This allows the lexer to correctly handle strings like:
          ${'backslash quote right-curly is \\\'}'}
      
      And also allows users to use the bitwise-or operator to mean bitwise or
      simply by enclosing the expression inside parens:
          ${(0x5432 | 0x8000)}
      
      or by using it in the middle of a dictionary literal:
          ${ {'foo-val': 0x43 | 0x100, 'bar-val': 0x22 | 0x100}[thing+'-val']}
      
      or inside brackets:
          ${ big_lookup_dict[index_low | (indexhigh << 3)] }
      
      Basically, only "top level" uses of the vertical bar mean pipe.
      
      (Note that currently, any non-top-level use of the vertical bar in
      an expression just results in a syntax error in the generated python,
      so no working code is affected by this change)
      34f90e69
  10. Oct 27, 2015
  11. Oct 26, 2015
  12. Oct 13, 2015
    • Roman Imankulov's avatar
      Ensure babel i18n extactor works properly with non-ascii input · d838e449
      Roman Imankulov authored
      If mako templates contain something like "_('Köln')", babel extractor converts
      it to pure ASCII so that resulting .po file would contain "K\xf6ln". Not all
      translation tools and translations are ready for such kind of escape sequences.
      
      Babel allows message ids to be non-ascii, the plugin just has to return Unicode
      objects instead of ASCII strings (and that's exactly how Babel built-in Python
      and JavaScript extractors work).
      
      This fix ensures mako extractor doesn't excape non-ascii symbols, works well
      both for Unicode and non-unicode input (there is a test for cp1251 encoding),
      and also provides a workaround for babel charset detector python-babel/babel#274.
      d838e449
  13. Aug 27, 2015
  14. Aug 26, 2015
  15. Aug 12, 2015
  16. Aug 08, 2015
  17. Jul 26, 2015
  18. Jul 25, 2015
  19. Jun 03, 2015
Loading