This should fix#7366 for now, but using the (IMHO) pragmatic approach
of extending the sed expression to recognize strings.
However, this approach is obviously not parsing the full AST, nor does
it wrap Python itself (as pointed out by @spwhitt in #7366) but tries to
match Python strings as best as possible without getting TOO unreadable.
We also use a little bit of Nix to help generating the SED expression,
because doing the whole quote matching block over and over again would
be quite repetitious and error-prone to change. The reason why I'm using
imap here is that we need to have unique labels to avoid jumping into
the wrong branch.
So the new expression is not only able to match continous regions of
triple-quoted strings, but also regions with only one quote character
(even with escaped inner quotes) and empty strings.
However, what it doesn't correctly recognize is something like this:
"string1" "string2" "multi
line
string"
Which is very unlikely that we'll find something like this in the wild.
Of course, we could handle it as well, but it would mean that we need to
substitute the current line into hold space until we're finished parsing
the strings, branch off to another label where we match multiline
strings of all sorts and swap hold/pattern space and finally print the
result. So to summarize: The SED expression would be 3 to 4 times bigger
than now and we gain very little from that.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Needed to be able to run 'make serve' in a pelican directory, else this
happens:
$ make serve
cd /home/bfo/pelican-test/output && python -m pelican.server
/run/current-system/sw/bin/python: No module named markupsafe
make: *** [serve] Error 1
Regression introduced by 56a6f22d7fb4690871669eba38a30e4f5a8cb483.
I'm temporarily pulling in test_mccabe.py, as suggested by someone at
flintwork/mccabe#31, which for now should fix the build (and the tests
of course as well).
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Bug Fixes:
- Add more SQL keywords for auto-complete suggestion.
- Messages raised as part of stored procedures are no longer ignored.
- Use postgres flavored syntax highlighting instead of generic ANSI SQL.
Also updated argh to 0.26.1 and added dependencies: pathtools, svg.path
and watchdog. Tests are disabled because one test assumes we are using
docutils 0.12 but we only have docutils 0.11 at the moment.
The autoconf build system for poppler does not support building the
wrappers separately, so this slightly enlarges the size of closures. To
compensate, the command-line utilities have been separated into their
own package.