Fossil SCM
Rename the htmlTagLength() function to html_tag_length().
Commit
3f99bca912466f98149eb897a1c856469485c0970bd406b00eaef1e485343250
Parent
a3ab0c6186b4323…
2 files changed
+1
-1
+3
-3
+1
-1
| --- src/markdown_html.c | ||
| +++ src/markdown_html.c | ||
| @@ -142,11 +142,11 @@ | ||
| 142 | 142 | && size>9 |
| 143 | 143 | && title!=0 |
| 144 | 144 | && sqlite3_strnicmp("<h1",data,3)==0 |
| 145 | 145 | && sqlite3_strnicmp("</h1>", &data[size-5],5)==0 |
| 146 | 146 | ){ |
| 147 | - int nTag = htmlTagLength(data); | |
| 147 | + int nTag = html_tag_length(data); | |
| 148 | 148 | blob_append(title, data+nTag, size - nTag - 5); |
| 149 | 149 | return; |
| 150 | 150 | } |
| 151 | 151 | INTER_BLOCK(ob); |
| 152 | 152 | blob_append(ob, data, size); |
| 153 | 153 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -142,11 +142,11 @@ | |
| 142 | && size>9 |
| 143 | && title!=0 |
| 144 | && sqlite3_strnicmp("<h1",data,3)==0 |
| 145 | && sqlite3_strnicmp("</h1>", &data[size-5],5)==0 |
| 146 | ){ |
| 147 | int nTag = htmlTagLength(data); |
| 148 | blob_append(title, data+nTag, size - nTag - 5); |
| 149 | return; |
| 150 | } |
| 151 | INTER_BLOCK(ob); |
| 152 | blob_append(ob, data, size); |
| 153 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -142,11 +142,11 @@ | |
| 142 | && size>9 |
| 143 | && title!=0 |
| 144 | && sqlite3_strnicmp("<h1",data,3)==0 |
| 145 | && sqlite3_strnicmp("</h1>", &data[size-5],5)==0 |
| 146 | ){ |
| 147 | int nTag = html_tag_length(data); |
| 148 | blob_append(title, data+nTag, size - nTag - 5); |
| 149 | return; |
| 150 | } |
| 151 | INTER_BLOCK(ob); |
| 152 | blob_append(ob, data, size); |
| 153 |
+3
-3
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -469,11 +469,11 @@ | ||
| 469 | 469 | ** z points to a "<" character. Check to see if this is the start of |
| 470 | 470 | ** a valid markup. If it is, return the total number of characters in |
| 471 | 471 | ** the markup including the initial "<" and the terminating ">". If |
| 472 | 472 | ** it is not well-formed markup, return 0. |
| 473 | 473 | */ |
| 474 | -int htmlTagLength(const char *z){ | |
| 474 | +int html_tag_length(const char *z){ | |
| 475 | 475 | int n = 1; |
| 476 | 476 | int inparen = 0; |
| 477 | 477 | int c; |
| 478 | 478 | if( z[n]=='/' ){ n++; } |
| 479 | 479 | if( !fossil_isalpha(z[n]) ) return 0; |
| @@ -656,11 +656,11 @@ | ||
| 656 | 656 | ** characters in that token. Write the token type into *pTokenType. |
| 657 | 657 | */ |
| 658 | 658 | static int nextWikiToken(const char *z, Renderer *p, int *pTokenType){ |
| 659 | 659 | int n; |
| 660 | 660 | if( z[0]=='<' ){ |
| 661 | - n = htmlTagLength(z); | |
| 661 | + n = html_tag_length(z); | |
| 662 | 662 | if( n>0 ){ |
| 663 | 663 | *pTokenType = TOKEN_MARKUP; |
| 664 | 664 | return n; |
| 665 | 665 | }else{ |
| 666 | 666 | *pTokenType = TOKEN_CHARACTER; |
| @@ -2026,11 +2026,11 @@ | ||
| 2026 | 2026 | */ |
| 2027 | 2027 | int html_token_length(const char *z){ |
| 2028 | 2028 | int n; |
| 2029 | 2029 | char c; |
| 2030 | 2030 | if( (c=z[0])=='<' ){ |
| 2031 | - n = htmlTagLength(z); | |
| 2031 | + n = html_tag_length(z); | |
| 2032 | 2032 | if( n<=0 ) n = 1; |
| 2033 | 2033 | }else if( fossil_isspace(c) ){ |
| 2034 | 2034 | for(n=1; z[n] && fossil_isspace(z[n]); n++){} |
| 2035 | 2035 | }else if( c=='&' ){ |
| 2036 | 2036 | n = z[1]=='#' ? 2 : 1; |
| 2037 | 2037 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -469,11 +469,11 @@ | |
| 469 | ** z points to a "<" character. Check to see if this is the start of |
| 470 | ** a valid markup. If it is, return the total number of characters in |
| 471 | ** the markup including the initial "<" and the terminating ">". If |
| 472 | ** it is not well-formed markup, return 0. |
| 473 | */ |
| 474 | int htmlTagLength(const char *z){ |
| 475 | int n = 1; |
| 476 | int inparen = 0; |
| 477 | int c; |
| 478 | if( z[n]=='/' ){ n++; } |
| 479 | if( !fossil_isalpha(z[n]) ) return 0; |
| @@ -656,11 +656,11 @@ | |
| 656 | ** characters in that token. Write the token type into *pTokenType. |
| 657 | */ |
| 658 | static int nextWikiToken(const char *z, Renderer *p, int *pTokenType){ |
| 659 | int n; |
| 660 | if( z[0]=='<' ){ |
| 661 | n = htmlTagLength(z); |
| 662 | if( n>0 ){ |
| 663 | *pTokenType = TOKEN_MARKUP; |
| 664 | return n; |
| 665 | }else{ |
| 666 | *pTokenType = TOKEN_CHARACTER; |
| @@ -2026,11 +2026,11 @@ | |
| 2026 | */ |
| 2027 | int html_token_length(const char *z){ |
| 2028 | int n; |
| 2029 | char c; |
| 2030 | if( (c=z[0])=='<' ){ |
| 2031 | n = htmlTagLength(z); |
| 2032 | if( n<=0 ) n = 1; |
| 2033 | }else if( fossil_isspace(c) ){ |
| 2034 | for(n=1; z[n] && fossil_isspace(z[n]); n++){} |
| 2035 | }else if( c=='&' ){ |
| 2036 | n = z[1]=='#' ? 2 : 1; |
| 2037 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -469,11 +469,11 @@ | |
| 469 | ** z points to a "<" character. Check to see if this is the start of |
| 470 | ** a valid markup. If it is, return the total number of characters in |
| 471 | ** the markup including the initial "<" and the terminating ">". If |
| 472 | ** it is not well-formed markup, return 0. |
| 473 | */ |
| 474 | int html_tag_length(const char *z){ |
| 475 | int n = 1; |
| 476 | int inparen = 0; |
| 477 | int c; |
| 478 | if( z[n]=='/' ){ n++; } |
| 479 | if( !fossil_isalpha(z[n]) ) return 0; |
| @@ -656,11 +656,11 @@ | |
| 656 | ** characters in that token. Write the token type into *pTokenType. |
| 657 | */ |
| 658 | static int nextWikiToken(const char *z, Renderer *p, int *pTokenType){ |
| 659 | int n; |
| 660 | if( z[0]=='<' ){ |
| 661 | n = html_tag_length(z); |
| 662 | if( n>0 ){ |
| 663 | *pTokenType = TOKEN_MARKUP; |
| 664 | return n; |
| 665 | }else{ |
| 666 | *pTokenType = TOKEN_CHARACTER; |
| @@ -2026,11 +2026,11 @@ | |
| 2026 | */ |
| 2027 | int html_token_length(const char *z){ |
| 2028 | int n; |
| 2029 | char c; |
| 2030 | if( (c=z[0])=='<' ){ |
| 2031 | n = html_tag_length(z); |
| 2032 | if( n<=0 ) n = 1; |
| 2033 | }else if( fossil_isspace(c) ){ |
| 2034 | for(n=1; z[n] && fossil_isspace(z[n]); n++){} |
| 2035 | }else if( c=='&' ){ |
| 2036 | n = z[1]=='#' ? 2 : 1; |
| 2037 |