dépôts
/
ptitvelo
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~maj 3.0.11
[ptitvelo/web/www.git]
/
www
/
plugins-dist
/
textwheel
/
inc
/
notes.php
diff --git
a/www/plugins-dist/textwheel/inc/notes.php
b/www/plugins-dist/textwheel/inc/notes.php
index
d51916e
..
44dfa6c
100644
(file)
--- 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."<a href='#nb$ancre' class='spip_note' rel='footnote'$title$att>$nom</a>"._NOTES_FERME_REF;
$pos = strpos($letexte, $note_source);
if ($nom) $nom = _NOTES_OUVRE_REF."<a href='#nb$ancre' class='spip_note' rel='footnote'$title$att>$nom</a>"._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));
}
. code_echappement($nom)
. substr($letexte, $pos + strlen($note_source));
}
+
return array($letexte, $mes_notes);
}
return array($letexte, $mes_notes);
}
@@
-167,7
+172,7
@@
function traiter_les_notes($notes,$ignorer_autobr) {
. code_echappement($nom
? _NOTES_OUVRE_NOTE."<a".$atts.">$nom</a>"._NOTES_FERME_NOTE
: '')
. code_echappement($nom
? _NOTES_OUVRE_NOTE."<a".$atts.">$nom</a>"._NOTES_FERME_NOTE
: '')
- .
$texte
+ .
trim($texte)
.'</div>';
}
if ($ignorer_autobr)
.'</div>';
}
if ($ignorer_autobr)