forked from Mynigma/HTMLPurifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLPurifier_Node_Text.m
More file actions
40 lines (31 loc) · 842 Bytes
/
Copy pathHTMLPurifier_Node_Text.m
File metadata and controls
40 lines (31 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// HTMLPurifier_Node_Text.m
// HTMLPurifier
//
// Created by Roman Priebe on 12.01.14.
#import "HTMLPurifier_Node_Text.h"
#import "HTMLPurifier_Token_Text.h"
@implementation HTMLPurifier_Node_Text
/**
* Constructor, accepts data and determines if it is whitespace.
* @param string $data String parsed character data.
* @param int $line
* @param int $col
*/
- (id)initWithData:(NSString*)d isWhitespace:(BOOL)isW line:(NSNumber*)l col:(NSNumber*)c
{
self = [super init];
if (self) {
_data = d;
self.isWhitespace = isW;
self.line = l;
self.col = c;
self.name = @"#PCDATA";
}
return self;
}
- (NSArray*)toTokenPair
{
return @[[[HTMLPurifier_Token_Text alloc] initWithData:self.data line:self.line col:self.col], [NSNull null]];
}
@end