X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Ftextwheel%2Finc%2Fnotes.php;h=44dfa6c74098dd6ac8dd874fa1bebd9302ffde9c;hp=d51916e25a3ddb833569daa0b9b17c7abc8c8b7a;hb=f08ec3a19775a7a173534b2d5cb7e9920b6253a6;hpb=58a2baa86ad2e12b4ff338d137f826a0a10ccbd7 diff --git a/www/plugins-dist/textwheel/inc/notes.php b/www/plugins-dist/textwheel/inc/notes.php index d51916e2..44dfa6c7 100644 --- a/www/plugins-dist/textwheel/inc/notes.php +++ b/www/plugins-dist/textwheel/inc/notes.php @@ -145,11 +145,16 @@ function traiter_raccourci_notes($letexte, $marqueur_notes) if ($nom) $nom = _NOTES_OUVRE_REF."$nom"._NOTES_FERME_REF; $pos = strpos($letexte, $note_source); - $letexte = rtrim(substr($letexte, 0, $pos), ' ') + + // supprimer les ' ' ou 'nbsp;' avant un appel de note + $avant = preg_replace(',( | |'.chr(194).chr(160).')+$,S', '', substr($letexte, 0, $pos)); + + $letexte = $avant . code_echappement($nom) . substr($letexte, $pos + strlen($note_source)); } + return array($letexte, $mes_notes); } @@ -167,7 +172,7 @@ function traiter_les_notes($notes,$ignorer_autobr) { . code_echappement($nom ? _NOTES_OUVRE_NOTE."$nom"._NOTES_FERME_NOTE : '') - . $texte + . trim($texte) .''; } if ($ignorer_autobr)