summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/lib/PicoFeed/Rules/alainonline.net.php
blob: 2faf0c4a701365ff34e58edc9bcd48e091662a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
return array(
    'grabber' => array(
        '%.*%' => array(
            'test_url' => 'http://www.alainonline.net/news_details.php?lang=arabic&sid=18907',
            'body' => array(
                '//div[@class="news_details"]'
            ),
            'strip' => array(
                '//div[@class="news_details"]/div/div[last()]',
            ),
        )
    )
);
ass="k">if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml' " don't indent pure non-xml code return 0 endif endif return 1 endfun " [-- return the sum of indents of a:lnum --] fun! <SID>XmlIndentSum(lnum, style, add) let line = getline(a:lnum) if a:style == match(line, '^\s*</') return (&sw * \ (<SID>XmlIndentWithPattern(line, b:xml_indent_open) \ - <SID>XmlIndentWithPattern(line, b:xml_indent_close) \ - <SID>XmlIndentWithPattern(line, '.\{-}/>'))) + a:add else return a:add endif endfun fun! XmlIndentGet(lnum, use_syntax_check) " Find a non-empty line above the current line. let lnum = prevnonblank(a:lnum - 1) " Hit the start of the file, use zero indent. if lnum == 0 return 0 endif if a:use_syntax_check if 0 == <SID>XmlIndentSynCheck(lnum) || 0 == <SID>XmlIndentSynCheck(a:lnum) return indent(a:lnum) endif endif let ind = <SID>XmlIndentSum(lnum, -1, indent(lnum)) let ind = <SID>XmlIndentSum(a:lnum, 0, ind) return ind endfun " vim:ts=8