2017-06-21 06:18:46 +02:00
|
|
|
//
|
|
|
|
// RSHTMLLinkParser.h
|
2017-06-25 23:06:01 +02:00
|
|
|
// RSParser
|
2017-06-21 06:18:46 +02:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 8/7/16.
|
|
|
|
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
@import Foundation;
|
|
|
|
|
|
|
|
/*Returns all <a href="some_url">some_text</a> as RSHTMLLink object array.*/
|
|
|
|
|
2017-06-26 01:32:07 +02:00
|
|
|
@class ParserData;
|
2017-06-21 06:18:46 +02:00
|
|
|
@class RSHTMLLink;
|
|
|
|
|
|
|
|
@interface RSHTMLLinkParser : NSObject
|
|
|
|
|
2017-06-26 01:32:07 +02:00
|
|
|
+ (NSArray <RSHTMLLink *> *)htmlLinksWithParserData:(ParserData *)parserData;
|
2017-06-21 06:18:46 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface RSHTMLLink : NSObject
|
|
|
|
|
|
|
|
// Any of these, even urlString, may be nil, because HTML can be bad.
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) NSString *urlString; //absolute
|
|
|
|
@property (nonatomic, readonly) NSString *text;
|
|
|
|
@property (nonatomic, readonly) NSString *title; //title attribute inside anchor tag
|
|
|
|
|
|
|
|
@end
|