alphagov/smartdown — pull request #79 by dsingleton (2014-10-25 19:23:11+00:00)
Title: Don't expose Parselet::Slice to Models

This is some techdebt cleanup, occasionally Slice strings surface unexpectedly and cause problems.

Slices are like regular strings, except;
- they remember where they were in the original string
- they don't implement all string methods

See: http://www.rubydoc.info/github/kschiess/parslet/Parslet/Slice

As we don't rely on the original position information and any Smartdown
model can be constructed manually, or potentially by another parser
they shouldn't need to be aware of Slices at all.

Cast all Slices to strings during transformation. Remove a model test
that expected slices, as it's not needed anymore