@@ -49,7 +49,7 @@ var CODE_INDENT_LENGTH = 4;
49
49
var MIN_FENCE_COUNT = 3 ;
50
50
var MAX_ATX_COUNT = 6 ;
51
51
var MAX_LINE_HEADING_INDENT = 3 ;
52
- var HORIZONTAL_RULE_MARKER_COUNT = 3 ;
52
+ var THEMATIC_BREAK_MARKER_COUNT = 3 ;
53
53
var MIN_CLOSING_HTML_NEWLINE_COUNT = 2 ;
54
54
var MIN_BREAK_LENGTH = 2 ;
55
55
var MIN_TABLE_COLUMNS = 2 ;
@@ -186,7 +186,7 @@ var CDATA_END_LENGTH = CDATA_END.length;
186
186
* Node types.
187
187
*/
188
188
189
- var T_HORIZONTAL_RULE = 'horizontalRule ' ;
189
+ var T_THEMATIC_BREAK = 'thematicBreak ' ;
190
190
var T_HTML = 'html' ;
191
191
var T_YAML = 'yaml' ;
192
192
var T_TABLE = 'table' ;
@@ -1388,14 +1388,14 @@ function tokenizeLineHeading(eat, value, silent) {
1388
1388
* Tokenise a horizontal rule.
1389
1389
*
1390
1390
* @example
1391
- * tokenizeHorizontalRule (eat, '***');
1391
+ * tokenizeThematicBreak (eat, '***');
1392
1392
*
1393
1393
* @param {function(string) } eat - Eater.
1394
1394
* @param {string } value - Rest of content.
1395
1395
* @param {boolean? } [silent] - Whether this is a dry run.
1396
- * @return {Node?|boolean } - `horizontalRule ` node.
1396
+ * @return {Node?|boolean } - `thematicBreak ` node.
1397
1397
*/
1398
- function tokenizeHorizontalRule ( eat , value , silent ) {
1398
+ function tokenizeThematicBreak ( eat , value , silent ) {
1399
1399
var self = this ;
1400
1400
var index = - 1 ;
1401
1401
var length = value . length + 1 ;
@@ -1434,7 +1434,7 @@ function tokenizeHorizontalRule(eat, value, silent) {
1434
1434
} else if ( character === C_SPACE ) {
1435
1435
queue += character ;
1436
1436
} else if (
1437
- markerCount >= HORIZONTAL_RULE_MARKER_COUNT &&
1437
+ markerCount >= THEMATIC_BREAK_MARKER_COUNT &&
1438
1438
( ! character || character === C_NEWLINE )
1439
1439
) {
1440
1440
subvalue += queue ;
@@ -1443,7 +1443,7 @@ function tokenizeHorizontalRule(eat, value, silent) {
1443
1443
return true ;
1444
1444
}
1445
1445
1446
- return eat ( subvalue ) ( self . renderVoid ( T_HORIZONTAL_RULE ) ) ;
1446
+ return eat ( subvalue ) ( self . renderVoid ( T_THEMATIC_BREAK ) ) ;
1447
1447
} else {
1448
1448
return ;
1449
1449
}
@@ -1549,7 +1549,7 @@ function tokenizeBlockquote(eat, value, silent) {
1549
1549
tokenizers . fences . call ( self , eat , rest , true ) ||
1550
1550
tokenizers . heading . call ( self , eat , rest , true ) ||
1551
1551
tokenizers . lineHeading . call ( self , eat , rest , true ) ||
1552
- tokenizers . horizontalRule . call ( self , eat , rest , true ) ||
1552
+ tokenizers . thematicBreak . call ( self , eat , rest , true ) ||
1553
1553
tokenizers . html . call ( self , eat , rest , true ) ||
1554
1554
tokenizers . list . call ( self , eat , rest , true )
1555
1555
)
@@ -1820,7 +1820,7 @@ function tokenizeList(eat, value, silent) {
1820
1820
1821
1821
if ( currentMarker && RULE_MARKERS [ currentMarker ] === true ) {
1822
1822
if (
1823
- tokenizers . horizontalRule . call ( self , eat , line , true )
1823
+ tokenizers . thematicBreak . call ( self , eat , line , true )
1824
1824
) {
1825
1825
break ;
1826
1826
}
@@ -1863,7 +1863,7 @@ function tokenizeList(eat, value, silent) {
1863
1863
1864
1864
if (
1865
1865
! pedantic &&
1866
- tokenizers . horizontalRule . call ( self , eat , line , true )
1866
+ tokenizers . thematicBreak . call ( self , eat , line , true )
1867
1867
) {
1868
1868
break ;
1869
1869
}
@@ -3322,7 +3322,7 @@ function tokenizeParagraph(eat, value, silent) {
3322
3322
subvalue = value . slice ( index + 1 ) ;
3323
3323
3324
3324
if (
3325
- tokenizers . horizontalRule . call ( self , eat , subvalue , true ) ||
3325
+ tokenizers . thematicBreak . call ( self , eat , subvalue , true ) ||
3326
3326
tokenizers . heading . call ( self , eat , subvalue , true ) ||
3327
3327
tokenizers . fences . call ( self , eat , subvalue , true ) ||
3328
3328
tokenizers . blockquote . call ( self , eat , subvalue , true ) ||
@@ -3686,7 +3686,7 @@ function renderBlockquote(value, now) {
3686
3686
* Create a void node.
3687
3687
*
3688
3688
* @example
3689
- * renderVoid('horizontalRule ');
3689
+ * renderVoid('thematicBreak ');
3690
3690
*
3691
3691
* @param {string } type - Node type.
3692
3692
* @return {Object } - Node of type `type`.
@@ -6080,7 +6080,7 @@ Parser.prototype.blockTokenizers = {
6080
6080
'fences' : tokenizeFences ,
6081
6081
'heading' : tokenizeHeading ,
6082
6082
'lineHeading' : tokenizeLineHeading ,
6083
- 'horizontalRule ' : tokenizeHorizontalRule ,
6083
+ 'thematicBreak ' : tokenizeThematicBreak ,
6084
6084
'blockquote' : tokenizeBlockquote ,
6085
6085
'list' : tokenizeList ,
6086
6086
'html' : tokenizeHTML ,
@@ -6101,7 +6101,7 @@ Parser.prototype.blockMethods = [
6101
6101
'fences' ,
6102
6102
'blockquote' ,
6103
6103
'heading' ,
6104
- 'horizontalRule ' ,
6104
+ 'thematicBreak ' ,
6105
6105
'list' ,
6106
6106
'lineHeading' ,
6107
6107
'html' ,
0 commit comments