import { CoreStart } from 'kibana/public' ; import Mustache from 'mustache' ; const TEMPLATE_TAGS = [ '{' , '}' ] ; export function renderMustache ( { text , docLinks , } ) { const template = Array . isArray ( text ) ? text . join ( '\n' ) : text ; Mustache . parse ( template , TEMPLATE_TAGS ) ; return Mustache . render ( template , { config : { docs : { base_url : docLinks ?. ELASTIC_WEBSITE_URL , version : docLinks ?. DOC_LINK_VERSION , } , } , } ) ; }