Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39ada64

Browse files
author
Artur Zakirov
committed
Do not break words with underscore
1 parent 3db3824 commit 39ada64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tsparser.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,7 @@ static const TParserStateActionItem actionTPS_InAsciiWord[] = {
11011101
{p_iseqC, '-', A_PUSH, TPS_InHostFirstAN, 0, NULL},
11021102
{p_iseqC, '-', A_PUSH, TPS_InHyphenAsciiWordFirst, 0, NULL},
11031103
{p_iseqC, '_', A_PUSH, TPS_InHostFirstAN, 0, NULL},
1104+
{p_iseqC, '_', A_PUSH, TPS_InHyphenAsciiWordFirst, 0, NULL},
11041105
{p_iseqC, '@', A_PUSH, TPS_InEmail, 0, NULL},
11051106
{p_iseqC, ':', A_PUSH, TPS_InProtocolFirst, 0, NULL},
11061107
{p_iseqC, '/', A_PUSH, TPS_InFileFirst, 0, NULL},
@@ -1607,6 +1608,7 @@ static const TParserStateActionItem actionTPS_InHyphenAsciiWord[] = {
16071608
{p_isspecial, 0, A_NEXT, TPS_InHyphenWord, 0, NULL},
16081609
{p_isdigit, 0, A_NEXT, TPS_InHyphenNumWord, 0, NULL},
16091610
{p_iseqC, '-', A_PUSH, TPS_InHyphenAsciiWordFirst, 0, NULL},
1611+
{p_iseqC, '_', A_PUSH, TPS_InHyphenAsciiWordFirst, 0, NULL},
16101612
{NULL, 0, A_BINGO | A_CLRALL, TPS_InParseHyphen, ASCIIHWORD, SpecialHyphen}
16111613
};
16121614

@@ -1623,6 +1625,7 @@ static const TParserStateActionItem actionTPS_InHyphenWord[] = {
16231625
{p_isspecial, 0, A_NEXT, TPS_InHyphenWord, 0, NULL},
16241626
{p_isdigit, 0, A_NEXT, TPS_InHyphenNumWord, 0, NULL},
16251627
{p_iseqC, '-', A_PUSH, TPS_InHyphenWordFirst, 0, NULL},
1628+
{p_iseqC, '_', A_PUSH, TPS_InHyphenWordFirst, 0, NULL},
16261629
{NULL, 0, A_BINGO | A_CLRALL, TPS_InParseHyphen, HWORD, SpecialHyphen}
16271630
};
16281631

@@ -1655,6 +1658,7 @@ static const TParserStateActionItem actionTPS_InParseHyphen[] = {
16551658
{p_isalpha, 0, A_NEXT, TPS_InHyphenWordPart, 0, NULL},
16561659
{p_isdigit, 0, A_PUSH, TPS_InHyphenUnsignedInt, 0, NULL},
16571660
{p_iseqC, '-', A_PUSH, TPS_InParseHyphenHyphen, 0, NULL},
1661+
{p_iseqC, '_', A_PUSH, TPS_InParseHyphenHyphen, 0, NULL},
16581662
{NULL, 0, A_RERUN, TPS_Base, 0, NULL}
16591663
};
16601664

0 commit comments

Comments
 (0)