split ruby & html formatting