]> _ Git - fluidbook_tools.git/commitdiff
wait #6024 @0:15
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jun 2023 14:57:04 +0000 (16:57 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jun 2023 14:57:04 +0000 (16:57 +0200)
.idea/deployment.xml
src/Links/AnchorLink.php

index ff7f409b9f5e5ad4eea579f0b1d4c4c796ade867..6f144a767c79d46a0afd5cd197ab13d864a0e9c9 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="PublishConfigData" autoUpload="Always" serverName="dev.toolbox.fluidbook.com" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false" autoUploadExternalChanges="true" showAutoUploadSettingsWarning="false">
+  <component name="PublishConfigData" autoUpload="Always" serverName="toolbox.fluidbook.com" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false" autoUploadExternalChanges="true" showAutoUploadSettingsWarning="false">
     <option name="confirmBeforeUploading" value="false" />
     <serverData>
       <paths name="alphaville.cubedesigners.com">
index ffc375ed3229c13daf62c4da0f32099dab0b80d0..38ad54f9b0e15f7bdae0da92184a3946815f6b42 100644 (file)
@@ -4,24 +4,20 @@ namespace Fluidbook\Tools\Links;
 
 use Cubist\Util\Text;
 
-class AnchorLink extends Link
-{
+class AnchorLink extends Link {
     protected $role = '';
 
-    protected function _getHTMLContainer()
-    {
+    protected function _getHTMLContainer() {
         $this->to = self::normalizeAnchor($this->to);
         $this->compiler->addPageLabel($this->page, $this->to);
         return '<div aria-hidden="false" data-anchor="' . trim($this->to, '# ') . '" class="anchor ' . $this->getHTMLContainerClass() . '" data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $this->getAdditionnalContent() . '>' . $this->getHTMLContent() . '</div>';
     }
 
-    public function getHTMLContent()
-    {
+    public function getHTMLContent() {
         return '';
     }
 
-    public static function normalizeAnchor($anchor)
-    {
-        return mb_strtolower(Text::str2URL($anchor));
+    public static function normalizeAnchor($anchor) {
+        return str_replace('-', '', mb_strtolower(Text::str2URL(trim($anchor))));
     }
 }