Skip to content
Extraits de code Groupes Projets
Valider 54104338 rédigé par Fil's avatar Fil
Parcourir les fichiers

dans les tables : caption et summary

parent 75f3c49e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -692,10 +692,14 @@ function traiter_tableau($bloc) { ...@@ -692,10 +692,14 @@ function traiter_tableau($bloc) {
// Gestion de la premiere ligne : // Gestion de la premiere ligne :
if ($l == 1) { if ($l == 1) {
// - <caption> sous forme de ||xxx|| en premiere ligne // - <caption> et summary dans la premiere ligne :
if (preg_match(',^\|\|([^|]*)\|$,ms', $ligne, $caption)) { // || caption | summary || (|summary est optionnel)
$debut_table .= "<caption>".$caption[1]."</caption>\n"; if (preg_match(',^\|\|([^|]*)(\|(.*))?\|$,ms', $ligne, $cap)) {
$l = 0; $l = 0;
if ($caption = trim($cap[1]))
$debut_table .= "<caption>".$caption."</caption>\n";
if ($summary = trim($cap[3]))
$summary = ' summary="'.entites_html($summary).'"';
} }
// - <thead> sous la forme |{{titre}}|{{titre}}| // - <thead> sous la forme |{{titre}}|{{titre}}|
// Attention thead oblige a avoir tbody // Attention thead oblige a avoir tbody
...@@ -732,7 +736,7 @@ function traiter_tableau($bloc) { ...@@ -732,7 +736,7 @@ function traiter_tableau($bloc) {
} }
} }
return "\n\n</no p><table class=\"spip\">\n" return "\n\n</no p><table class=\"spip\"$summary>\n"
. $debut_table . $debut_table
. "<tbody>\n" . "<tbody>\n"
. join ('', $html) . join ('', $html)
......
...@@ -1354,7 +1354,9 @@ table.spip { ...@@ -1354,7 +1354,9 @@ table.spip {
} }
table.spip caption{ table.spip caption{
caption-side: top; caption-side: top; /* bottom */
text-align:center;
background-color: #FCF4D0;
} }
table.spip tr.row_first { table.spip tr.row_first {
......
...@@ -58,6 +58,8 @@ table.spip { ...@@ -58,6 +58,8 @@ table.spip {
table.spip caption{ table.spip caption{
caption-side: top; /* bottom */ caption-side: top; /* bottom */
text-align:center;
background-color: #FCF4D0;
} }
table.spip tr.row_first { table.spip tr.row_first {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter