Exemplo n.º 1
0
 /**
  * @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>';
 }
Exemplo n.º 2
0
 /**
  * @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;
 }