Changeset 110701 in spip-zone for _plugins_/yaml/trunk


Ignore:
Timestamp:
Jun 17, 2018, 9:24:53 AM (15 months ago)
Author:
eric@…
Message:

amélioration des regex de détection des --- et ...

Location:
_plugins_/yaml/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/yaml/trunk/demo/yaml_fonctions.php

    r110700 r110701  
    1414
    1515function decoder_fichier_yaml($filename, $options = array()) {
    16         $timestamp_debut = microtime(true);
    1716
    1817        include_spip('inc/yaml');
    1918        $file = find_in_path($filename);
     19        $timestamp_debut = microtime(true);
     20
    2021        $parsed = yaml_decode_file($file, $options);
    2122
  • _plugins_/yaml/trunk/inc/libyaml.php

    r110670 r110701  
    3131
    3232        // Suppression des --- et ... de début et fin.
    33         $yaml = preg_replace(array(",^---[\r\n]*,", ",...$,"), array('', ''), $yaml);
     33        $yaml = preg_replace(array("#^\-\-\-.*?\n#s", "#\.\.\.\s*$#"), array('', ''), $yaml);
    3434
    3535        return $yaml;
  • _plugins_/yaml/trunk/paquet.xml

    r110697 r110701  
    22        prefix="yaml"
    33        categorie="outil"
    4         version="2.0.6"
     4        version="2.0.7"
    55        etat="test"
    66        compatibilite="[3.0.0;3.2.*]"
Note: See TracChangeset for help on using the changeset viewer.