lines = $lines; return $this; } public function render() { require_celerity_resource('phabricator-source-code-view-css'); require_celerity_resource('syntax-highlighting-css'); Javelin::initBehavior('phabricator-oncopy', array()); $line_number = 1; $rows = array(); foreach ($this->lines as $line) { // TODO: Provide nice links. $rows[] = ''. ''. phutil_escape_html($line_number). ''. ''. "\xE2\x80\x8B". $line. ''. ''; $line_number++; } $classes = array(); $classes[] = 'phabricator-source-code-view'; $classes[] = 'remarkup-code'; $classes[] = 'PhabricatorMonospaced'; return phutil_render_tag( 'table', array( 'class' => implode(' ', $classes), ), implode('', $rows)); } }