Plugin Directory

Changeset 3235016


Ignore:
Timestamp:
02/04/2025 08:53:01 PM (13 months ago)
Author:
bikkel
Message:

tagging version 2.3.3

Location:
news-parser
Files:
740 added
4 edited

Legend:

Unmodified
Added
Removed
  • news-parser/trunk/inc/Parser/HTMLPatternParser.php

    r3234821 r3235016  
    5454
    5555        $elements = $exclude_template ? $this->excludeElements($container, $elements, $exclude_template) : $elements;
    56 
     56        $elements = $this->removeDuplicateElements($elements);
    5757        $body = $this->parseContainer($elements);
    5858        return $body ? $body : '';
     
    148148        return $body;
    149149    }
     150    protected function removeDuplicateElements($elements)
     151    {
     152        $index=0;
     153        $unique_elements = array_filter($elements, function ($element) use ($elements,&$index) {
     154            $result= $element->tag_start !== $elements[$index-1]->tag_start;
     155            if($index==0) {
     156                $index++;
     157                return true;
     158            }
     159            $index++;
     160            return $result;
     161        });
     162        return $unique_elements;
     163    }
    150164    protected function getContainerSearchTemplate($template)
    151165    {
  • news-parser/trunk/inc/Parser/Modifiers/AdapterModifiers/Before/GeneratePostBodyWithAI.php

    r3234821 r3235016  
    103103                    if($block['json']){
    104104                        $block['element']= $this->decodeJSON($output);
     105                        $block['json']= $output;
    105106                    }else{
    106107                        $block['element']['content'] = $output;
  • news-parser/trunk/news-parser.php

    r3234821 r3235016  
    44Plugin URI: https://www.news-parser.com
    55Description: Parse full text news from RSS Feed
    6 Version: 2.3.2
     6Version: 2.3.3
    77Author: Evgeny S.Zalevskiy <[email protected]>
    88Author URI: https://github.com/zalevsk1y/
     
    1515
    1616
    17 define ('NEWS_PARSER_PLUGIN_VERSION', '2.3.2');
     17define ('NEWS_PARSER_PLUGIN_VERSION', '2.3.3');
    1818define ("NEWS_PARSER_PLUGIN_MODE","production");
    1919
  • news-parser/trunk/readme.txt

    r3234821 r3235016  
    77Requires at least: 5.2.0
    88Tested up to: 6.7.1
    9 Stable tag: 2.3.2
     9Stable tag: 2.3.3
    1010License: MIT
    1111License URI: https://opensource.org/licenses/MIT
Note: See TracChangeset for help on using the changeset viewer.