marijnh/CodeMirror2 — pull request #724 by joostwim (2012-08-14 14:48:10+00:00)
Title: Make documentation reflect peek()'s behaviour.

String.prototype.charAt returns '' (empty string) for characters outside the range of the string.

Either the documentation should be updated (which I've done in this pull request), or the implementation should be changed to have a guard just like in `next()`:

```javascript
StringStream.prototype = {
peek: function() {return this.string.charAt(this.pos);},
next: function() {
if (this.pos < this.string.length)
return this.string.charAt(this.pos++);
}
};
```