jayferd/rouge — pull request #46 by garybernhardt (2013-02-04 04:14:37+00:00)
Title: Python: single quotes inside double and vice-versa

Currently, in this code:

```python
"it's working"
```

the single quote (apostrophe) gets highlighted as an error. It's valid Python, though. This is also true of double quotes inside single-quoted strings, and the equivalents for triple-quoted strings.

The problem seems to be is that the lexer considers either ' or " to terminate a string. I've split the base `string` mixin into one for single-quoted strings and one for double-quoted strings.

There's one thing that confuses me: if I remove the strings_single mixin from the tsqs state entirely, it still works. I don't know what's going on there. Perhaps the lexer is incorrectly lexing the triple-quoted string as multiple single-quoted strings? Everything looks right, in any case.