/** * @param SplitPosition $entry * @return string */ public function createSpanEnd(SplitPosition $entry) { $highlight = $entry->getHighlight(); $wrappendElement = ""; if ($highlight) { $htmlElement = $highlight->getHtmlElement(); if ($htmlElement) { $wrappendElement = $htmlElement->getClosingText(); } } return $wrappendElement . '</span>'; }
/** * @param SplitPosition $entry * @return bool */ protected function checkForAnchor(SplitPosition $entry) { $shouldShowAnchor = !$this->anchorDrawn && $entry->getHighlight()->getType() != Highlight::KEYWORD; if ($shouldShowAnchor) { $this->anchorDrawn = true; } return $shouldShowAnchor; }