Changeset 46200 in spip-zone


Ignore:
Timestamp:
Mar 31, 2011, 10:02:04 AM (8 years ago)
Author:
cedric@…
Message:

report en wheel de http://core.spip.org/projects/spip/repository/revisions/17442
pour ouvrir un paragraphe derrière une balise bloc qui ne serait pas suivie de \n\n dans le source

Location:
_core_/plugins/textwheel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/textwheel/plugin.xml

    r46198 r46200  
    44        <icon>textwheel-64.png</icon>
    55        <licence>GNU/GPL</licence>
    6         <version>0.4.0</version>
     6        <version>0.4.1</version>
    77        <etat>test</etat>
    88        <description>Integrer TextWheel dans SPIP</description>
  • _core_/plugins/textwheel/wheels/spip/spip-paragrapher.yaml

    r46198 r46200  
    1313    type: all
    1414    replace: "<p>$0"
     15
     16toujours-ouvrir:
     17    # toujours ouvrir un parapgraphe derriere une balise bloc fermante
     18    if_str: "</"
     19    match: ",</(?:div|pre|ul|ol|li|blockquote|h[1-6r]|t(able|[rdh]|head|body|foot|extarea)|form|object|center|marquee|address|applet|iframe|d[ltd]|script|noscript|map|button|fieldset|style)[^>]*>\s*?,UimsS"
     20    replace: "$0<p>"
    1521
    1622ajouter-stop-p1:
     
    3440    # en pure wheel : le \s* agit comme trim() et remplace reduire-blancs2
    3541    match: ",<p (.*)\s*<(/?)(STOP P|div|pre|ul|ol|li|blockquote|h[1-6r]|t(able|[rdh]|head|body|foot|extarea)|form|object|center|marquee|address|applet|iframe|d[ltd]|script|noscript|map|button|fieldset|style)\b,UimsS"
    36     replace: "\n<p $1</p>\n<$2$3"
     42    replace: "<p $1</p>\n<$2$3"
    3743    disabled: Y
    3844
     
    7480    # Renommer les paragraphes normaux
    7581    match: "<p >"
    76     replace: "<p>"
     82    replace: "\n<p>"
    7783    type: str
    7884
  • _core_/plugins/textwheel/wheels/spip/spip.php

    r41863 r46200  
    1717 */
    1818function fermer_para_mano(&$t) {
    19         # match: ",<p (.*)<(/?)(STOP P|div|pre|ul|ol|li|blockquote|h[1-6r]|t(able|[rdh]|body|foot|extarea)|form|object|center|marquee|address|d[ltd]|script|noscript|map|button|fieldset|style)\b,UimsS"
     19        # match: ",<p (.*)<(/?)(STOP P|div|pre|ul|ol|li|blockquote|h[1-6r]|t(able|[rdh]|head|body|foot|extarea)|form|object|center|marquee|address|applet|iframe|d[ltd]|script|noscript|map|button|fieldset|style)\b,UimsS"
    2020        # replace: "\n<p "+trim($1)+"</p>\n<$2$3"
    2121
     
    2626                        $pi = strtolower($p);
    2727                        if (preg_match(
    28                         ",</?(?:stop p|div|pre|ul|ol|li|blockquote|h[1-6r]|t(able|[rdh]|body|foot|extarea)|form|object|center|marquee|address|d[ltd]|script|noscript|map|button|fieldset|style)\b,S",
     28                        ",</?(?:stop p|div|pre|ul|ol|li|blockquote|h[1-6r]|t(able|[rdh]|head|body|foot|extarea)|form|object|center|marquee|address|applet|iframe|d[ltd]|script|noscript|map|button|fieldset|style)\b,S",
    2929                        $pi, $r)) {
    3030                                $pos = strpos($pi, $r[0]);
Note: See TracChangeset for help on using the changeset viewer.