import React from 'react'
import ReactHtmlParser from 'react-html-parser'
/*
  '行政服务-快递<span style="color:#ff9445">申请</span>行政服务-快递<span style="color:#ff9445">申请</span>'.replace(/\<span.*?\>(.+?)\<\/span\>/g,'<span>$1</span>')
  "行政服务-快递<span>申请</span>行政服务-快递<span>申请</span>"
 */
export default (text) => {
  if(!text) {
    return null
  }
  return ReactHtmlParser(text.replace(/\<span.*?\>(.+?)\<\/span\>/g,'<span class="s-primary">$1</span>'))
}