| 1 |
--- |
| 2 |
title: Constants |
| 3 |
--- |
| 4 |
|
| 5 |
# Constants |
| 6 |
|
| 7 |
Constants define how the parser treats documents. They can be defined before |
| 8 |
loading the parser to globally replace the default values. |
| 9 |
|
| 10 |
## DEFAULT_TARGET_CHARSET |
| 11 |
|
| 12 |
Defines the default target charset for text returned by the parser. |
| 13 |
|
| 14 |
Default: `'UTF-8'` |
| 15 |
|
| 16 |
## DEFAULT_BR_TEXT |
| 17 |
|
| 18 |
Defines the default text to return for `<br>` elements. |
| 19 |
|
| 20 |
Default: `"\r\n"` |
| 21 |
|
| 22 |
## DEFAULT_SPAN_TEXT |
| 23 |
|
| 24 |
Defines the default text to return for `<span>` elements. |
| 25 |
|
| 26 |
Default: `' '` |
| 27 |
|
| 28 |
## MAX_FILE_SIZE |
| 29 |
|
| 30 |
Defines the maximum number of bytes the parser can load into memory. This limit |
| 31 |
only applies to the source file or string. |
| 32 |
|
| 33 |
Default: `600000` |