daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest Jul 22nd, 2011 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- pygments/formatters/latex.py.orig   2011-07-22 22:55:29.000000000 +0300
  2. +++ pygments/formatters/latex.py        2011-07-22 22:58:29.000000000 +0300
  3. @@ -96,11 +96,9 @@
  4.      \let\%(cp)s@ul=\relax \let\%(cp)s@tc=\relax%%
  5.      \let\%(cp)s@bc=\relax \let\%(cp)s@ff=\relax}
  6.  \def\%(cp)s@tok#1{\csname %(cp)s@tok@#1\endcsname}
  7. -\def\%(cp)s@toks#1+{\ifx\relax#1\empty\else%%
  8. -    \%(cp)s@tok{#1}\expandafter\%(cp)s@toks\fi}
  9.  \def\%(cp)s@do#1{\%(cp)s@bc{\%(cp)s@tc{\%(cp)s@ul{%%
  10.      \%(cp)s@it{\%(cp)s@bf{\%(cp)s@ff{#1}}}}}}}
  11. -\def\%(cp)s#1#2{\%(cp)s@reset\%(cp)s@toks#1+\relax+\%(cp)s@do{#2}}
  12. +\def\%(cp)s#1#2{\%(cp)s@reset\%(cp)s@tok{#1}\%(cp)s@do{#2}}
  13.  
  14.  %(styles)s
  15.  
  16. @@ -340,14 +338,11 @@
  17.              else:
  18.                  value = escape_tex(value, self.commandprefix)
  19.              styles = []
  20. -            while ttype is not Token:
  21. -                try:
  22. -                    styles.append(t2n[ttype])
  23. -                except KeyError:
  24. -                    # not in current style
  25. -                    styles.append(_get_ttype_name(ttype))
  26. -                ttype = ttype.parent
  27. -            styleval = '+'.join(reversed(styles))
  28. +            try:
  29. +                styleval = t2n[ttype]
  30. +            except KeyError:
  31. +                # not in current style
  32. +                styleval = _get_ttype_name(ttype)
  33.              if styleval:
  34.                  spl = value.split('\n')
  35.                  for line in spl[:-1]:
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top