diff options
author | thatch <devnull@localhost> | 2008-12-31 13:57:59 -0600 |
---|---|---|
committer | thatch <devnull@localhost> | 2008-12-31 13:57:59 -0600 |
commit | 24788ab3a97b23e696fb25c37570a625f6a394b3 (patch) | |
tree | e0d44452380b8df14038b7e06bf7212adee3608d | |
parent | 5558f64a93a25b051b134c4058be8bde666d7b3f (diff) | |
parent | b4fb254d9c3891311fbfbfec0e1f64f353299971 (diff) | |
download | pygments-24788ab3a97b23e696fb25c37570a625f6a394b3.tar.gz |
Merge pygments-main
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | pygments/formatters/html.py | 7 | ||||
-rw-r--r-- | pygments/lexers/agile.py | 1 |
3 files changed, 8 insertions, 2 deletions
@@ -11,6 +11,8 @@ Version 1.1 - Fix a few problems in Matlab lexer (#378). +- Support multiline strings in Lua lexer. + - Fix a Perl heredoc bug (#729) - Fix a bug in the image formatter which misdetected lines (#380) diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index be4c91bd..f7834099 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -500,9 +500,12 @@ class HtmlFormatter(Formatter): ls = '\n'.join([(i%st == 0 and ('%*d' % (mw, i)) or '') for i in range(fl, fl + lncount)]) + # in case you wonder about the seemingly redundant <div> here: since the + # content in the other cell also is wrapped in a div, some browsers in + # some configurations seem to mess up the formatting... yield 0, ('<table class="%stable">' % self.cssclass + - '<tr><td class="linenos"><pre>' + - ls + '</pre></td><td class="code">') + '<tr><td class="linenos"><div class="linenodiv"><pre>' + + ls + '</pre></div></td><td class="code">') yield 0, dummyoutfile.getvalue() yield 0, '</td></tr></table>' diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 092223e1..e80e3fdd 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -1021,6 +1021,7 @@ class LuaLexer(RegexLexer): (r'\n', Text), (r'[^\S\n]', Text), + (r'(?s)\[(=*)\[.*?\]\1\]', String.Multiline), (r'[\[\]\{\}\(\)\.,:;]', Punctuation), (r'(==|~=|<=|>=|\.\.|\.\.\.|[=+\-*/%^<>#])', Operator), |