 		super.init(parser: parser, chunk: pchunk)
 		update(text: NSAttributedString(string: contents.substring(from: range)!))
 	}
-	
+
 	override var rawText: String {
 		var opts = options.value
 		if opts.count > 0 { opts = " " + opts }

				lastTextChunk = tchunk
				lastWasInline = false
			case .code:
				let cchunk = CodeChunk(parser: parser, contents: parser.textStorage.string, range: parserChunk.innerRange, options: parserChunk.rOps)
				if parserChunk.isInline, let lastChunk = lastTextChunk {
					let achunk = InternalInlineCodeChunk(parser: parser, contents: parser.textStorage.string, range: parserChunk.innerRange, options: parserChunk.rOps)
					attach(chunk: achunk, to: lastChunk.textStorage)
					lastWasInline = true
					return


// MARK: -
class EquationChunk: InternalRmdChunk, Equation {
	init(parser: SyntaxParser, contents: NSAttributedString, range: NSRange, innerRange: NSRange) {
		let pchunk = DocumentChunk(chunkType: .equation, docType: .latex, equationType: .display,
								   range: range, innerRange: innerRange, chunkNumber: 1)
		super.init(parser: parser, chunk: pchunk)
		// FIXME: notebook was blowing up with attributed equations
//		let eqstr = contents.attributedSubstring(from: range)
		let eqstr = NSAttributedString(string: contents.string.substring(from: innerRange)!)
		update(text: eqstr)
	}

	init(parser: SyntaxParser, contents: String, range: NSRange, innerRange: NSRange) {
		let pchunk = DocumentChunk(chunkType: .equation, docType: .latex, equationType: .display,
								   range: range, innerRange: innerRange, chunkNumber: 1)
