/// <summary>
        /// Raises an event that a block's text spans had changed.
        /// </summary>
        /// <param name="block"></param>
        public void RaiseTextSpansChanged(Block block)
        {
            EventHandler<BlockEventArgs> listeners = TextSpansChanged;

            if (listeners != null)
            {
                var args = new BlockEventArgs(block);
                listeners(this, args);
            }
        }
        private void OnTextSpansChanged(
			object sender,
			BlockEventArgs e)
        {
            int blockIndex = blocks.IndexOf(e.Block);
            var args = new LineChangedArgs(blockIndex);
            RaiseLineChanged(args);
        }
        /// <summary>
        /// Raises an event that a block's type had changed.
        /// </summary>
        /// <param name="block"></param>
        /// <param name="oldBlockType"></param>
        public void RaiseBlockTypeChanged(
			Block block,
			BlockType oldBlockType)
        {
            EventHandler<BlockEventArgs> listeners = BlockTypeChanged;

            if (listeners != null)
            {
                var args = new BlockEventArgs(block);
                listeners(this, args);
            }
        }