Пример #1
0
def find_css_selector(view, start_pt):
    conds = [track_scope(CSS_SELECTOR)]

    if not view.match_selector(start_pt, CSS_SELECTOR):
        conds.insert(0, track_scope(CSS_SELECTOR, False))
    
    selector = back_track(view, start_pt, *conds)[-1]

    if selector is not None:
        return view.substr(selector).strip()
Пример #2
0
def find_attribute_name(view, start_pt):
    conds = track_scope('string'), track_regex('\s|='), track_regex('\S')
    regions = back_track(view, start_pt, *conds)
    return view.substr(regions[-1])


################################################################################
def find_attribute_name(view, start_pt):
    conds   = track_scope('string'), track_regex('\s|='), track_regex('\S')
    regions = back_track(view, start_pt, *conds)
    return view.substr(regions[-1])

################################################################################
Пример #4
0
def find_css_property(view, start_pt):
    conds   = track_scope(CSS_PROP, False), track_scope(CSS_PROP)
    regions = back_track(view, start_pt, *conds)
    return view.substr(regions[-1])