<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pygments-git.git/pygments/lexers/html.py, branch examplefiles</title>
<subtitle>github.com: pygments/pygments.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/'/>
<entry>
<title>Run pyupgrade across codebase to modernize syntax and patterns (#1622)</title>
<updated>2021-01-17T15:44:58+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2021-01-17T15:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=debda34e2d4f28d6d369cdafdcba4791702f63fc'/>
<id>debda34e2d4f28d6d369cdafdcba4791702f63fc</id>
<content type='text'>
pyupgrade is a tool to automatically upgrade syntax for newer versions
of the Python language.

The project has been Python 3 only since
35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups:

- Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all
  source files as utf-8 by default.

- Replace IOError/EnvironmentError with OSError. Python 3 unified these
  exceptions. The old names are aliases only.

- Use the Python 3 shorter super() syntax.

- Remove "utf8" argument form encode/decode. In Python 3, this value is
  the default.

- Remove "r" from open() calls. In Python 3, this value is the default.

- Remove u prefix from Unicode strings. In Python 3, all strings are
  Unicode.

- Replace io.open() with builtin open(). In Python 3, these functions
  are functionally equivalent.

Co-authored-by: Matthäus G. Chajdas &lt;Anteru@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pyupgrade is a tool to automatically upgrade syntax for newer versions
of the Python language.

The project has been Python 3 only since
35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups:

- Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all
  source files as utf-8 by default.

- Replace IOError/EnvironmentError with OSError. Python 3 unified these
  exceptions. The old names are aliases only.

- Use the Python 3 shorter super() syntax.

- Remove "utf8" argument form encode/decode. In Python 3, this value is
  the default.

- Remove "r" from open() calls. In Python 3, this value is the default.

- Remove u prefix from Unicode strings. In Python 3, all strings are
  Unicode.

- Replace io.open() with builtin open(). In Python 3, these functions
  are functionally equivalent.

Co-authored-by: Matthäus G. Chajdas &lt;Anteru@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Bump copyright year.</title>
<updated>2021-01-03T17:03:23+00:00</updated>
<author>
<name>Matthäus G. Chajdas</name>
<email>dev@anteru.net</email>
</author>
<published>2021-01-03T17:03:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=a590ac5ea7c00a41e253834306bfa19e38349c0b'/>
<id>a590ac5ea7c00a41e253834306bfa19e38349c0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix a lot more backtracking string regexes</title>
<updated>2020-12-25T12:21:48+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2020-12-25T11:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=6c820019a73a606940d7477619a5a9e6ad38761d'/>
<id>6c820019a73a606940d7477619a5a9e6ad38761d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Unclosed script/style tag handling Fixes #1614 (#1615)</title>
<updated>2020-12-05T16:56:40+00:00</updated>
<author>
<name>Nick Gerner</name>
<email>nick.gerner@gmail.com</email>
</author>
<published>2020-12-05T16:56:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=78665a43ba9c5835bd304f2065c17c3d7270b0cd'/>
<id>78665a43ba9c5835bd304f2065c17c3d7270b0cd</id>
<content type='text'>
Explicitly handle unclosed &lt;script&gt; and &lt;style&gt; tags which previously
would result in O(n^2) work to lex as Error tokens per character up to
the end of the line or end of file (whichever comes first).

Now we try lexing the rest of the line as Javascript/CSS  if there's no
closing script/style tag. We recover on the next line in the root state
if there is a newline, otherwise just keep parsing as Javascript/CSS.

This is similar to how the error handling in lexer.py works except we
get Javascript or CSS tokens instead of Error tokens. And we get to the
end of the line much faster since we don't apply an O(n) regex for every
character in the line.

I added a new test suite for html lexer (there wasn't one except for
coverage in test_examplefiles.py) including a trivial happy-path case
and several cases around &lt;script&gt; and &lt;style&gt; fragments, including
regression coverage that fails on the old logic.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Explicitly handle unclosed &lt;script&gt; and &lt;style&gt; tags which previously
would result in O(n^2) work to lex as Error tokens per character up to
the end of the line or end of file (whichever comes first).

Now we try lexing the rest of the line as Javascript/CSS  if there's no
closing script/style tag. We recover on the next line in the root state
if there is a newline, otherwise just keep parsing as Javascript/CSS.

This is similar to how the error handling in lexer.py works except we
get Javascript or CSS tokens instead of Error tokens. And we get to the
end of the line much faster since we don't apply an O(n) regex for every
character in the line.

I added a new test suite for html lexer (there wasn't one except for
coverage in test_examplefiles.py) including a trivial happy-path case
and several cases around &lt;script&gt; and &lt;style&gt; fragments, including
regression coverage that fails on the old logic.</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year (fixes #1514.)</title>
<updated>2020-08-22T14:08:07+00:00</updated>
<author>
<name>Matthäus G. Chajdas</name>
<email>dev@anteru.net</email>
</author>
<published>2020-08-22T14:08:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=5bd2a84bc1db0120828606c900a14276414fecdc'/>
<id>5bd2a84bc1db0120828606c900a14276414fecdc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update project to use modern Python features and idioms</title>
<updated>2019-11-25T11:12:41+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2019-11-24T20:55:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=1dc6c8e2b473717188632f9a0c28c4342428e684'/>
<id>1dc6c8e2b473717188632f9a0c28c4342428e684</id>
<content type='text'>
Run the pyupgrade tool across the project to use modern language
features.

- Use set literals
- Use dict comprehension
- Remove unnecessary numeric indexes in format string
- Remove unnecessary extra parentheses
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run the pyupgrade tool across the project to use modern language
features.

- Use set literals
- Use dict comprehension
- Remove unnecessary numeric indexes in format string
- Remove unnecessary extra parentheses
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixup all headers and some more minor problems.</title>
<updated>2019-05-28T05:00:40+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2019-05-28T05:00:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=597020d4ce90505dad8b850eadafd20f06bf1dc9'/>
<id>597020d4ce90505dad8b850eadafd20f06bf1dc9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix remaining 'DeprecationWarning: invalid escape sequence' occurrences in lexer files</title>
<updated>2018-06-19T19:05:00+00:00</updated>
<author>
<name>Andreas Kloeckner</name>
<email>inform@tiker.net</email>
</author>
<published>2018-06-19T19:05:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=6de7d2347cbd833ba562ff9fb75deed5f9777316'/>
<id>6de7d2347cbd833ba562ff9fb75deed5f9777316</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Copyright update.</title>
<updated>2017-01-22T17:38:11+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2017-01-22T17:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=00126a1401eefcf0280384d9bf59783e81db41ed'/>
<id>00126a1401eefcf0280384d9bf59783e81db41ed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for partials and path segments for Handlebars.</title>
<updated>2016-11-04T23:57:38+00:00</updated>
<author>
<name>Christian Hammond</name>
<email>christian@beanbaginc.com</email>
</author>
<published>2016-11-04T23:57:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/pygments-git.git/commit/?id=6ded9db39463372e5205a36bea72d6de516ece69'/>
<id>6ded9db39463372e5205a36bea72d6de516ece69</id>
<content type='text'>
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`&gt;` in `{{&gt; ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:

* Standard partials: `{{&gt; partialName}}`
* Partials with parameters: `{{&gt; partialName varname="value"}}`
* Ddynamic partials: `{{&gt; (partialFunc)}}`
* Ddynamic partials with lookups: `{{&gt; (lookup ../path "partialName")}}`
* Partial blocks: `{{&gt; @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`

It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`&gt;` in `{{&gt; ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:

* Standard partials: `{{&gt; partialName}}`
* Partials with parameters: `{{&gt; partialName varname="value"}}`
* Ddynamic partials: `{{&gt; (partialFunc)}}`
* Ddynamic partials with lookups: `{{&gt; (lookup ../path "partialName")}}`
* Partial blocks: `{{&gt; @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`

It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
</pre>
</div>
</content>
</entry>
</feed>
