ext/dtext/dtext.c in dtext_rb-1.0.4 vs ext/dtext/dtext.c in dtext_rb-1.0.5

- old
+ new

@@ -3,10 +3,11 @@ // situationally print newlines to make the generated html // easier to read #define PRETTY_PRINT 0 #include <ruby.h> +#include <ruby/encoding.h> #include <stdio.h> #include <stdint.h> #include <stdbool.h> #include <glib.h> @@ -67,15 +68,15 @@ static const int BLOCK_H4 = 26; static const int BLOCK_H5 = 27; static const int BLOCK_H6 = 28; -#line 961 "ext/dtext/dtext.rl" +#line 966 "ext/dtext/dtext.rl" -#line 77 "ext/dtext/dtext.c" +#line 78 "ext/dtext/dtext.c" static const int dtext_start = 245; static const int dtext_first_final = 245; static const int dtext_error = -1; static const int dtext_en_inline = 260; @@ -84,11 +85,11 @@ static const int dtext_en_table = 299; static const int dtext_en_list = 301; static const int dtext_en_main = 245; -#line 964 "ext/dtext/dtext.rl" +#line 969 "ext/dtext/dtext.rl" static inline void underscore_string(char * str, size_t len) { for (size_t i=0; i<len; ++i) { if (str[i] == ' ') { str[i] = '_'; @@ -335,10 +336,13 @@ static void dstack_close_list(StateMachine * sm) { while (dstack_check(sm, BLOCK_LI) || dstack_check(sm, BLOCK_UL)) { dstack_rewind(sm); } + + sm->list_mode = false; + sm->list_nest = 0; } static inline bool is_boundary_c(char c) { switch (c) { case ':': @@ -404,10 +408,11 @@ VALUE input; VALUE options; VALUE opt_inline; VALUE opt_strip; VALUE ret; + rb_encoding * encoding = NULL; StateMachine * sm = NULL; g_debug("start\n"); if (argc == 0) { @@ -435,22 +440,22 @@ } } } -#line 441 "ext/dtext/dtext.c" +#line 446 "ext/dtext/dtext.c" { sm->cs = dtext_start; ( sm->top) = 0; ( sm->ts) = 0; ( sm->te) = 0; ( sm->act) = 0; } -#line 1314 "ext/dtext/dtext.rl" +#line 1323 "ext/dtext/dtext.rl" -#line 452 "ext/dtext/dtext.c" +#line 457 "ext/dtext/dtext.c" { if ( ( sm->p) == ( sm->pe) ) goto _test_eof; goto _resume; @@ -779,10 +784,12 @@ g_debug("block newline2"); if (sm->header_mode) { sm->header_mode = false; dstack_rewind(sm); + } else if (sm->list_mode) { + dstack_close_list(sm); } else { dstack_close_before_block(sm); } } break; @@ -793,11 +800,11 @@ break; } } goto st245; tr2: -#line 946 "ext/dtext/dtext.rl" +#line 951 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ g_debug("block char: %c", (*( sm->p))); ( sm->p)--; if (g_queue_is_empty(sm->dstack) || dstack_check(sm, BLOCK_QUOTE) || dstack_check(sm, BLOCK_SPOILER) || dstack_check(sm, BLOCK_EXPAND)) { @@ -820,22 +827,22 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st260;}} }} goto st245; tr14: -#line 855 "ext/dtext/dtext.rl" +#line 858 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("block [/spoiler]"); dstack_close_before_block(sm); if (dstack_check(sm, BLOCK_SPOILER)) { g_debug(" rewind"); dstack_rewind(sm); } }} goto st245; tr53: -#line 902 "ext/dtext/dtext.rl" +#line 905 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_close_before_block(sm); dstack_push(sm, &BLOCK_TABLE); append_block(sm, "<table class=\"striped\">"); { @@ -851,11 +858,11 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st299;}} }} goto st245; tr54: -#line 909 "ext/dtext/dtext.rl" +#line 912 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &BLOCK_TN); append_block(sm, "<p class=\"tn\">"); { size_t len = sm->stack->len; @@ -870,11 +877,11 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st260;}} }} goto st245; tr292: -#line 946 "ext/dtext/dtext.rl" +#line 951 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("block char: %c", (*( sm->p))); ( sm->p)--; if (g_queue_is_empty(sm->dstack) || dstack_check(sm, BLOCK_QUOTE) || dstack_check(sm, BLOCK_SPOILER) || dstack_check(sm, BLOCK_EXPAND)) { @@ -897,19 +904,19 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st260;}} }} goto st245; tr293: -#line 925 "ext/dtext/dtext.rl" +#line 928 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("block 0"); g_debug(" close dstack"); dstack_close(sm); }} goto st245; tr300: -#line 946 "ext/dtext/dtext.rl" +#line 951 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block char: %c", (*( sm->p))); ( sm->p)--; if (g_queue_is_empty(sm->dstack) || dstack_check(sm, BLOCK_QUOTE) || dstack_check(sm, BLOCK_SPOILER) || dstack_check(sm, BLOCK_EXPAND)) { @@ -932,15 +939,15 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st260;}} }} goto st245; tr301: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 915 "ext/dtext/dtext.rl" +#line 918 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block list"); g_debug(" call list"); sm->list_nest = 0; sm->list_mode = true; @@ -959,11 +966,11 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st301;}} }} goto st245; tr310: -#line 864 "ext/dtext/dtext.rl" +#line 867 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block [code]"); dstack_close_before_block(sm); dstack_push(sm, &BLOCK_CODE); append_block(sm, "<pre>"); @@ -980,11 +987,11 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st295;}} }} goto st245; tr311: -#line 881 "ext/dtext/dtext.rl" +#line 884 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block [expand=]"); dstack_close_before_block(sm); dstack_push(sm, &BLOCK_EXPAND); append_block(sm, "<div class=\"expandable\"><div class=\"expandable-header\">"); @@ -994,22 +1001,22 @@ append_block(sm, "<input type=\"button\" value=\"Show\" class=\"expandable-button\"/></div>"); append_block(sm, "<div class=\"expandable-content\">"); }} goto st245; tr313: -#line 872 "ext/dtext/dtext.rl" +#line 875 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block [expand]"); dstack_close_before_block(sm); dstack_push(sm, &BLOCK_EXPAND); append_block(sm, "<div class=\"expandable\"><div class=\"expandable-header\">"); append_block(sm, "<input type=\"button\" value=\"Show\" class=\"expandable-button\"/></div>"); append_block(sm, "<div class=\"expandable-content\">"); }} goto st245; tr314: -#line 893 "ext/dtext/dtext.rl" +#line 896 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block [nodtext]"); dstack_close_before_block(sm); dstack_push(sm, &BLOCK_NODTEXT); dstack_push(sm, &BLOCK_P); @@ -1027,33 +1034,33 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 245; goto st297;}} }} goto st245; tr315: -#line 837 "ext/dtext/dtext.rl" +#line 840 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block [quote]"); g_debug(" push quote"); g_debug(" print <blockquote>"); dstack_close_before_block(sm); dstack_push(sm, &BLOCK_QUOTE); append_block(sm, "<blockquote>"); }} goto st245; tr316: -#line 846 "ext/dtext/dtext.rl" +#line 849 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("block [spoiler]"); g_debug(" push spoiler"); g_debug(" print <div>"); dstack_close_before_block(sm); dstack_push(sm, &BLOCK_SPOILER); append_block(sm, "<div class=\"spoiler\">"); }} goto st245; tr318: -#line 792 "ext/dtext/dtext.rl" +#line 795 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ char header = *sm->a1; if (sm->f_inline) { header = '6'; @@ -1114,11 +1121,11 @@ if ( ++( sm->p) == ( sm->pe) ) goto _test_eof245; case 245: #line 1 "NONE" {( sm->ts) = ( sm->p);} -#line 1120 "ext/dtext/dtext.c" +#line 1127 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr293; case 10: goto tr294; case 13: goto st247; case 42: goto tr296; @@ -1127,24 +1134,24 @@ } goto tr292; tr1: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 931 "ext/dtext/dtext.rl" +#line 934 "ext/dtext/dtext.rl" {( sm->act) = 79;} goto st246; tr294: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 942 "ext/dtext/dtext.rl" +#line 947 "ext/dtext/dtext.rl" {( sm->act) = 80;} goto st246; st246: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof246; case 246: -#line 1146 "ext/dtext/dtext.c" +#line 1153 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 10: goto tr1; case 13: goto st0; } goto tr0; @@ -1163,73 +1170,73 @@ goto tr294; goto tr300; tr296: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st248; st248: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof248; case 248: -#line 1178 "ext/dtext/dtext.c" +#line 1185 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 9: goto tr5; case 32: goto tr5; case 42: goto st2; } goto tr300; tr5: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st1; st1: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof1; case 1: -#line 1195 "ext/dtext/dtext.c" +#line 1202 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr2; case 9: goto tr4; case 10: goto tr2; case 13: goto tr2; case 32: goto tr4; } goto tr3; tr3: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st249; st249: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof249; case 249: -#line 1214 "ext/dtext/dtext.c" +#line 1221 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr301; case 10: goto tr301; case 13: goto tr301; } goto st249; tr4: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st250; st250: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof250; case 250: -#line 1231 "ext/dtext/dtext.c" +#line 1238 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr301; case 9: goto tr4; case 10: goto tr301; case 13: goto tr301; @@ -1252,11 +1259,11 @@ goto st251; st251: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof251; case 251: -#line 1258 "ext/dtext/dtext.c" +#line 1265 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 47: goto st3; case 99: goto st11; case 101: goto st15; case 110: goto st23; @@ -1408,34 +1415,34 @@ case 21: if ( (*( sm->p)) == 93 ) goto tr2; goto tr26; tr26: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st22; st22: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof22; case 22: -#line 1423 "ext/dtext/dtext.c" +#line 1430 "ext/dtext/dtext.c" if ( (*( sm->p)) == 93 ) goto tr28; goto st22; tr28: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st253; st253: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof253; case 253: -#line 1437 "ext/dtext/dtext.c" +#line 1444 "ext/dtext/dtext.c" if ( (*( sm->p)) == 32 ) goto st253; if ( 9 <= (*( sm->p)) && (*( sm->p)) <= 13 ) goto st253; goto tr311; @@ -1658,39 +1665,39 @@ goto st258; st258: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof258; case 258: -#line 1664 "ext/dtext/dtext.c" +#line 1671 "ext/dtext/dtext.c" if ( 49 <= (*( sm->p)) && (*( sm->p)) <= 54 ) goto tr317; goto tr300; tr317: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st48; st48: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof48; case 48: -#line 1678 "ext/dtext/dtext.c" +#line 1685 "ext/dtext/dtext.c" if ( (*( sm->p)) == 46 ) goto tr55; goto tr2; tr55: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st259; st259: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof259; case 259: -#line 1692 "ext/dtext/dtext.c" +#line 1699 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 9: goto st259; case 32: goto st259; } goto tr318; @@ -1729,11 +1736,10 @@ g_debug("inline newline2"); g_debug(" return"); if (sm->list_mode) { dstack_close_list(sm); - sm->list_mode = false; } {( sm->p) = (( sm->ts))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} } @@ -1753,11 +1759,11 @@ break; } } goto st260; tr58: -#line 597 "ext/dtext/dtext.rl" +#line 600 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ g_debug("inline newline"); if (sm->header_mode) { sm->header_mode = false; @@ -1767,65 +1773,65 @@ append(sm, true, "<br>"); } }} goto st260; tr63: -#line 613 "ext/dtext/dtext.rl" +#line 616 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ g_debug("inline char: %c", (*( sm->p))); append_c_html_escaped(sm, (*( sm->p))); }} goto st260; tr74: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 328 "ext/dtext/dtext.rl" +#line 329 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ append(sm, true, "<a href=\""); append_segment_html_escaped(sm, sm->b1, sm->b2 - 1); append(sm, true, "\">"); append_segment_html_escaped(sm, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr122: -#line 236 "ext/dtext/dtext.rl" +#line 237 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ append(sm, true, "<a href=\"http://www.pixiv.net/member_illust.php?mode=medium&illust_id="); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "pixiv #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr141: -#line 169 "ext/dtext/dtext.rl" +#line 170 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ append(sm, true, "<a href=\"/forum_topics/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "topic #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr156: -#line 403 "ext/dtext/dtext.rl" +#line 407 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, INLINE_B)) { dstack_pop(sm); append(sm, true, "</strong>"); } else { append(sm, true, "[/b]"); } }} goto st260; tr162: -#line 539 "ext/dtext/dtext.rl" +#line 543 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_close_before_block(sm); if (dstack_check(sm, BLOCK_EXPAND)) { append_block(sm, "</div></div>"); @@ -1835,33 +1841,33 @@ append_block(sm, "[/expand]"); } }} goto st260; tr163: -#line 417 "ext/dtext/dtext.rl" +#line 421 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, INLINE_I)) { dstack_pop(sm); append(sm, true, "</em>"); } else { append(sm, true, "[/i]"); } }} goto st260; tr169: -#line 431 "ext/dtext/dtext.rl" +#line 435 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, INLINE_S)) { dstack_pop(sm); append(sm, true, "</s>"); } else { append(sm, true, "[/s]"); } }} goto st260; tr176: -#line 511 "ext/dtext/dtext.rl" +#line 515 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("inline [/spoiler]"); dstack_close_before_block(sm); if (dstack_check(sm, INLINE_SPOILER)) { @@ -1880,11 +1886,11 @@ append_block(sm, "[/spoiler]"); } }} goto st260; tr180: -#line 566 "ext/dtext/dtext.rl" +#line 570 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_TD)) { dstack_pop(sm); append_block(sm, "</td>"); { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} @@ -1892,11 +1898,11 @@ append_block(sm, "[/td]"); } }} goto st260; tr181: -#line 556 "ext/dtext/dtext.rl" +#line 560 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_TH)) { dstack_pop(sm); append_block(sm, "</th>"); { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} @@ -1904,11 +1910,11 @@ append_block(sm, "[/th]"); } }} goto st260; tr182: -#line 459 "ext/dtext/dtext.rl" +#line 463 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_close_before_block(sm); if (dstack_check(sm, BLOCK_TN)) { dstack_pop(sm); @@ -1920,22 +1926,22 @@ append_block(sm, "[/tn]"); } }} goto st260; tr183: -#line 445 "ext/dtext/dtext.rl" +#line 449 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, INLINE_U)) { dstack_pop(sm); append(sm, true, "</u>"); } else { append(sm, true, "[/u]"); } }} goto st260; tr188: -#line 266 "ext/dtext/dtext.rl" +#line 267 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ GString * segment = g_string_new_len(sm->a1, sm->a2 - sm->a1); GString * lowercase_segment = NULL; underscore_string(segment->str, segment->len); @@ -1954,11 +1960,11 @@ g_string_free(lowercase_segment, TRUE); g_string_free(segment, TRUE); }} goto st260; tr192: -#line 287 "ext/dtext/dtext.rl" +#line 288 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ GString * segment = g_string_new_len(sm->a1, sm->a2 - sm->a1); GString * lowercase_segment = NULL; underscore_string(segment->str, segment->len); @@ -1977,34 +1983,34 @@ g_string_free(lowercase_segment, TRUE); g_string_free(segment, TRUE); }} goto st260; tr193: -#line 398 "ext/dtext/dtext.rl" +#line 402 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &INLINE_B); append(sm, true, "<strong>"); }} goto st260; tr199: -#line 532 "ext/dtext/dtext.rl" +#line 536 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("inline [expand]"); dstack_rewind(sm); {( sm->p) = (((sm->p - 7)))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st260; tr200: -#line 412 "ext/dtext/dtext.rl" +#line 416 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &INLINE_I); append(sm, true, "<em>"); }} goto st260; tr207: -#line 551 "ext/dtext/dtext.rl" +#line 555 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &INLINE_NODTEXT); { size_t len = sm->stack->len; @@ -2018,77 +2024,77 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 260; goto st297;}} }} goto st260; tr212: -#line 481 "ext/dtext/dtext.rl" +#line 485 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("inline [quote]"); dstack_close_before_block(sm); {( sm->p) = (( sm->ts))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st260; tr213: -#line 426 "ext/dtext/dtext.rl" +#line 430 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &INLINE_S); append(sm, true, "<s>"); }} goto st260; tr220: -#line 504 "ext/dtext/dtext.rl" +#line 508 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("inline [spoiler]"); g_debug(" push <span>"); dstack_push(sm, &INLINE_SPOILER); append(sm, true, "<span class=\"spoiler\">"); }} goto st260; tr222: -#line 454 "ext/dtext/dtext.rl" +#line 458 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &INLINE_TN); append(sm, true, "<span class=\"tn\">"); }} goto st260; tr223: -#line 440 "ext/dtext/dtext.rl" +#line 444 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &INLINE_U); append(sm, true, "<u>"); }} goto st260; tr235: -#line 258 "ext/dtext/dtext.rl" +#line 259 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ append(sm, true, "<a rel=\"nofollow\" href=\"/posts?tags="); append_segment_uri_escaped(sm, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append_segment_html_escaped(sm, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr320: -#line 613 "ext/dtext/dtext.rl" +#line 616 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("inline char: %c", (*( sm->p))); append_c_html_escaped(sm, (*( sm->p))); }} goto st260; tr321: -#line 576 "ext/dtext/dtext.rl" +#line 580 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ g_debug("inline 0"); g_debug(" return"); ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st260; tr336: -#line 597 "ext/dtext/dtext.rl" +#line 600 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("inline newline"); if (sm->header_mode) { sm->header_mode = false; @@ -2098,66 +2104,68 @@ append(sm, true, "<br>"); } }} goto st260; tr339: -#line 584 "ext/dtext/dtext.rl" +#line 588 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("inline newline2"); g_debug(" return"); if (sm->list_mode) { dstack_close_list(sm); - sm->list_mode = false; } {( sm->p) = (( sm->ts))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st260; tr340: sm->cs = 260; -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 382 "ext/dtext/dtext.rl" +#line 383 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("inline list"); if (dstack_check(sm, BLOCK_LI)) { g_debug(" rewind li"); dstack_rewind(sm); } else if (dstack_check(sm, BLOCK_P)) { g_debug(" rewind p"); dstack_rewind(sm); + } else if (sm->header_mode) { + g_debug(" rewind header"); + dstack_rewind(sm); } g_debug(" next list"); {( sm->p) = (( sm->ts + 1))-1;} sm->cs = 301; }} goto _again; tr342: -#line 609 "ext/dtext/dtext.rl" +#line 612 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append_c(sm, ' '); }} goto st260; tr343: -#line 613 "ext/dtext/dtext.rl" +#line 616 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("inline char: %c", (*( sm->p))); append_c_html_escaped(sm, (*( sm->p))); }} goto st260; tr345: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 308 "ext/dtext/dtext.rl" +#line 309 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ if (is_boundary_c((*( sm->p)))) { sm->d = 2; sm->b = true; } else { @@ -2175,15 +2183,15 @@ append_c_html_escaped(sm, (*( sm->p))); } }} goto st260; tr347: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 361 "ext/dtext/dtext.rl" +#line 362 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ if (is_boundary_c((*( sm->p)))) { sm->b = true; sm->d = 2; } else { @@ -2202,11 +2210,11 @@ append_c_html_escaped(sm, (*( sm->p))); } }} goto st260; tr350: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } #line 1 "NONE" { switch( ( sm->act) ) { @@ -2242,11 +2250,10 @@ g_debug("inline newline2"); g_debug(" return"); if (sm->list_mode) { dstack_close_list(sm); - sm->list_mode = false; } {( sm->p) = (( sm->ts))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} } @@ -2266,90 +2273,90 @@ break; } } goto st260; tr352: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 218 "ext/dtext/dtext.rl" +#line 219 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/artists/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "artist #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr355: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 191 "ext/dtext/dtext.rl" +#line 192 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/comments/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "comment #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr358: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 160 "ext/dtext/dtext.rl" +#line 161 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/forum_posts/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "forum #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr361: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 227 "ext/dtext/dtext.rl" +#line 228 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"https://github.com/r888888888/danbooru/issues/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "issue #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr365: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 236 "ext/dtext/dtext.rl" +#line 237 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"http://www.pixiv.net/member_illust.php?mode=medium&illust_id="); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "pixiv #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr368: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 245 "ext/dtext/dtext.rl" +#line 246 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"http://www.pixiv.net/member_illust.php?mode=manga_big&illust_id="); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "&page="); append_segment(sm, true, sm->b1, sm->b2 - 1); @@ -2360,60 +2367,60 @@ append_segment(sm, false, sm->b1, sm->b2 - 1); append(sm, true, "</a>"); }} goto st260; tr370: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 200 "ext/dtext/dtext.rl" +#line 201 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/pools/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "pool #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr372: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 151 "ext/dtext/dtext.rl" +#line 152 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/posts/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "post #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr375: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 169 "ext/dtext/dtext.rl" +#line 170 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/forum_topics/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "topic #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr378: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 178 "ext/dtext/dtext.rl" +#line 179 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/forum_topics/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "?page="); append_segment(sm, true, sm->b1, sm->b2 - 1); @@ -2424,26 +2431,26 @@ append_segment(sm, false, sm->b1, sm->b2 - 1); append(sm, true, "</a>"); }} goto st260; tr381: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } -#line 209 "ext/dtext/dtext.rl" +#line 210 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append(sm, true, "<a href=\"/users/"); append_segment(sm, true, sm->a1, sm->a2 - 1); append(sm, true, "\">"); append(sm, false, "user #"); append_segment(sm, false, sm->a1, sm->a2 - 1); append(sm, true, "</a>"); }} goto st260; tr393: -#line 488 "ext/dtext/dtext.rl" +#line 492 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ g_debug("inline [/quote]"); dstack_close_before_block(sm); if (dstack_check(sm, BLOCK_LI)) { @@ -2457,19 +2464,19 @@ append_block(sm, "[/quote]"); } }} goto st260; tr396: -#line 475 "ext/dtext/dtext.rl" +#line 479 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ dstack_rewind(sm); {( sm->p) = (( sm->a1 - 1))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st260; tr398: -#line 336 "ext/dtext/dtext.rl" +#line 337 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ if (is_boundary_c((*( sm->p)))) { sm->b = true; sm->d = 2; } else { @@ -2494,11 +2501,11 @@ if ( ++( sm->p) == ( sm->pe) ) goto _test_eof260; case 260: #line 1 "NONE" {( sm->ts) = ( sm->p);} -#line 2500 "ext/dtext/dtext.c" +#line 2507 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr321; case 10: goto tr322; case 13: goto st265; case 34: goto tr324; @@ -2523,35 +2530,35 @@ } goto tr320; tr322: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 597 "ext/dtext/dtext.rl" +#line 600 "ext/dtext/dtext.rl" {( sm->act) = 43;} goto st261; st261: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof261; case 261: -#line 2536 "ext/dtext/dtext.c" +#line 2543 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 10: goto tr57; case 13: goto st49; case 42: goto tr338; } goto tr336; tr57: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 584 "ext/dtext/dtext.rl" +#line 588 "ext/dtext/dtext.rl" {( sm->act) = 42;} goto st262; st262: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof262; case 262: -#line 2553 "ext/dtext/dtext.c" +#line 2560 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 10: goto tr57; case 13: goto st49; } goto tr339; @@ -2561,73 +2568,73 @@ case 49: if ( (*( sm->p)) == 10 ) goto tr57; goto tr56; tr338: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st50; st50: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof50; case 50: -#line 2576 "ext/dtext/dtext.c" +#line 2583 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 9: goto tr59; case 32: goto tr59; case 42: goto st50; } goto tr58; tr59: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st51; st51: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof51; case 51: -#line 2593 "ext/dtext/dtext.c" +#line 2600 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr58; case 9: goto tr62; case 10: goto tr58; case 13: goto tr58; case 32: goto tr62; } goto tr61; tr61: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st263; st263: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof263; case 263: -#line 2612 "ext/dtext/dtext.c" +#line 2619 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr340; case 10: goto tr340; case 13: goto tr340; } goto st263; tr62: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st264; st264: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof264; case 264: -#line 2629 "ext/dtext/dtext.c" +#line 2636 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr340; case 9: goto tr62; case 10: goto tr340; case 13: goto tr340; @@ -2647,39 +2654,39 @@ goto st266; st266: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof266; case 266: -#line 2653 "ext/dtext/dtext.c" +#line 2660 "ext/dtext/dtext.c" if ( (*( sm->p)) == 34 ) goto tr343; goto tr344; tr344: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st52; st52: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof52; case 52: -#line 2667 "ext/dtext/dtext.c" +#line 2674 "ext/dtext/dtext.c" if ( (*( sm->p)) == 34 ) goto tr65; goto st52; tr65: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st53; st53: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof53; case 53: -#line 2681 "ext/dtext/dtext.c" +#line 2688 "ext/dtext/dtext.c" if ( (*( sm->p)) == 58 ) goto st54; goto tr63; st54: if ( ++( sm->p) == ( sm->pe) ) @@ -2690,20 +2697,20 @@ case 91: goto st56; case 104: goto tr69; } goto tr63; tr67: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st55; st55: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof55; case 55: -#line 2705 "ext/dtext/dtext.c" +#line 2712 "ext/dtext/dtext.c" if ( 33 <= (*( sm->p)) && (*( sm->p)) <= 126 ) goto st267; goto tr63; st267: if ( ++( sm->p) == ( sm->pe) ) @@ -2720,20 +2727,20 @@ case 47: goto tr71; case 104: goto tr72; } goto tr63; tr71: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st57; st57: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof57; case 57: -#line 2735 "ext/dtext/dtext.c" +#line 2742 "ext/dtext/dtext.c" if ( 33 <= (*( sm->p)) && (*( sm->p)) <= 126 ) goto st58; goto tr63; st58: if ( ++( sm->p) == ( sm->pe) ) @@ -2743,20 +2750,20 @@ goto tr74; if ( 33 <= (*( sm->p)) && (*( sm->p)) <= 126 ) goto st58; goto tr63; tr72: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st59; st59: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof59; case 59: -#line 2758 "ext/dtext/dtext.c" +#line 2765 "ext/dtext/dtext.c" if ( (*( sm->p)) == 116 ) goto st60; goto tr63; st60: if ( ++( sm->p) == ( sm->pe) ) @@ -2801,20 +2808,20 @@ case 65: if ( (*( sm->p)) == 58 ) goto st63; goto tr63; tr69: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st66; st66: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof66; case 66: -#line 2816 "ext/dtext/dtext.c" +#line 2823 "ext/dtext/dtext.c" if ( (*( sm->p)) == 116 ) goto st67; goto tr63; st67: if ( ++( sm->p) == ( sm->pe) ) @@ -2866,42 +2873,42 @@ case 268: if ( 33 <= (*( sm->p)) && (*( sm->p)) <= 126 ) goto tr346; goto tr343; tr346: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st269; st269: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof269; case 269: -#line 2881 "ext/dtext/dtext.c" +#line 2888 "ext/dtext/dtext.c" if ( (*( sm->p)) == 64 ) goto tr349; if ( 33 <= (*( sm->p)) && (*( sm->p)) <= 126 ) goto tr348; goto tr347; tr348: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 361 "ext/dtext/dtext.rl" +#line 362 "ext/dtext/dtext.rl" {( sm->act) = 19;} goto st270; tr349: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 357 "ext/dtext/dtext.rl" +#line 358 "ext/dtext/dtext.rl" {( sm->act) = 18;} goto st270; st270: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof270; case 270: -#line 2903 "ext/dtext/dtext.c" +#line 2910 "ext/dtext/dtext.c" if ( 33 <= (*( sm->p)) && (*( sm->p)) <= 126 ) goto tr348; goto tr350; tr326: #line 1 "NONE" @@ -2909,11 +2916,11 @@ goto st271; st271: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof271; case 271: -#line 2915 "ext/dtext/dtext.c" +#line 2922 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 82: goto st73; case 114: goto st73; } goto tr343; @@ -2973,20 +2980,20 @@ case 79: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr95; goto tr63; tr95: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st272; st272: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof272; case 272: -#line 2988 "ext/dtext/dtext.c" +#line 2995 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st272; goto tr352; tr327: #line 1 "NONE" @@ -2994,11 +3001,11 @@ goto st273; st273: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof273; case 273: -#line 3000 "ext/dtext/dtext.c" +#line 3007 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 79: goto st80; case 111: goto st80; } goto tr343; @@ -3067,20 +3074,20 @@ case 87: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr103; goto tr63; tr103: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st274; st274: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof274; case 274: -#line 3082 "ext/dtext/dtext.c" +#line 3089 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st274; goto tr355; tr328: #line 1 "NONE" @@ -3088,11 +3095,11 @@ goto st275; st275: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof275; case 275: -#line 3094 "ext/dtext/dtext.c" +#line 3101 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 79: goto st88; case 111: goto st88; } goto tr343; @@ -3143,20 +3150,20 @@ case 93: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr109; goto tr63; tr109: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st276; st276: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof276; case 276: -#line 3158 "ext/dtext/dtext.c" +#line 3165 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st276; goto tr358; tr329: #line 1 "NONE" @@ -3164,11 +3171,11 @@ goto st277; st277: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof277; case 277: -#line 3170 "ext/dtext/dtext.c" +#line 3177 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 83: goto st94; case 115: goto st94; } goto tr343; @@ -3219,20 +3226,20 @@ case 99: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr115; goto tr63; tr115: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st278; st278: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof278; case 278: -#line 3234 "ext/dtext/dtext.c" +#line 3241 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st278; goto tr361; tr330: #line 1 "NONE" @@ -3240,11 +3247,11 @@ goto st279; st279: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof279; case 279: -#line 3246 "ext/dtext/dtext.c" +#line 3253 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 73: goto st100; case 79: goto st108; case 105: goto st100; case 111: goto st108; @@ -3299,11 +3306,11 @@ goto tr121; goto tr63; tr121: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st280; tr367: @@ -3312,27 +3319,27 @@ goto st280; st280: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof280; case 280: -#line 3318 "ext/dtext/dtext.c" +#line 3325 "ext/dtext/dtext.c" if ( (*( sm->p)) == 47 ) goto tr366; if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr367; goto tr365; tr366: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st106; st106: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof106; case 106: -#line 3334 "ext/dtext/dtext.c" +#line 3341 "ext/dtext/dtext.c" if ( (*( sm->p)) == 112 ) goto st107; goto tr122; st107: if ( ++( sm->p) == ( sm->pe) ) @@ -3340,20 +3347,20 @@ case 107: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr124; goto tr122; tr124: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st281; st281: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof281; case 281: -#line 3355 "ext/dtext/dtext.c" +#line 3362 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st281; goto tr368; st108: if ( ++( sm->p) == ( sm->pe) ) @@ -3395,20 +3402,20 @@ case 112: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr130; goto tr63; tr130: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st282; st282: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof282; case 282: -#line 3410 "ext/dtext/dtext.c" +#line 3417 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st282; goto tr370; st113: if ( ++( sm->p) == ( sm->pe) ) @@ -3439,20 +3446,20 @@ case 116: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr134; goto tr63; tr134: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st283; st283: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof283; case 283: -#line 3454 "ext/dtext/dtext.c" +#line 3461 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st283; goto tr372; tr331: #line 1 "NONE" @@ -3460,11 +3467,11 @@ goto st284; st284: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof284; case 284: -#line 3466 "ext/dtext/dtext.c" +#line 3473 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 79: goto st117; case 111: goto st117; } goto tr343; @@ -3517,11 +3524,11 @@ goto tr140; goto tr63; tr140: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st285; tr377: @@ -3530,27 +3537,27 @@ goto st285; st285: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof285; case 285: -#line 3536 "ext/dtext/dtext.c" +#line 3543 "ext/dtext/dtext.c" if ( (*( sm->p)) == 47 ) goto tr376; if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr377; goto tr375; tr376: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st123; st123: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof123; case 123: -#line 3552 "ext/dtext/dtext.c" +#line 3559 "ext/dtext/dtext.c" if ( (*( sm->p)) == 112 ) goto st124; goto tr141; st124: if ( ++( sm->p) == ( sm->pe) ) @@ -3558,20 +3565,20 @@ case 124: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr143; goto tr141; tr143: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st286; st286: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof286; case 286: -#line 3573 "ext/dtext/dtext.c" +#line 3580 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st286; goto tr378; tr332: #line 1 "NONE" @@ -3579,11 +3586,11 @@ goto st287; st287: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof287; case 287: -#line 3585 "ext/dtext/dtext.c" +#line 3592 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 83: goto st125; case 115: goto st125; } goto tr343; @@ -3625,20 +3632,20 @@ case 129: if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto tr148; goto tr63; tr148: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st288; st288: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof288; case 288: -#line 3640 "ext/dtext/dtext.c" +#line 3647 "ext/dtext/dtext.c" if ( 48 <= (*( sm->p)) && (*( sm->p)) <= 57 ) goto st288; goto tr381; tr333: #line 1 "NONE" @@ -3646,11 +3653,11 @@ goto st289; st289: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof289; case 289: -#line 3652 "ext/dtext/dtext.c" +#line 3659 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 47: goto st130; case 91: goto st156; case 98: goto st162; case 101: goto st163; @@ -3873,78 +3880,78 @@ case 93: goto tr63; case 124: goto tr63; } goto tr184; tr184: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st157; st157: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof157; case 157: -#line 3888 "ext/dtext/dtext.c" +#line 3895 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 93: goto tr186; case 124: goto tr187; } goto st157; tr186: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st158; st158: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof158; case 158: -#line 3904 "ext/dtext/dtext.c" +#line 3911 "ext/dtext/dtext.c" if ( (*( sm->p)) == 93 ) goto tr188; goto tr63; tr187: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st159; st159: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof159; case 159: -#line 3918 "ext/dtext/dtext.c" +#line 3925 "ext/dtext/dtext.c" if ( (*( sm->p)) == 93 ) goto tr63; goto tr189; tr189: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st160; st160: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof160; case 160: -#line 3932 "ext/dtext/dtext.c" +#line 3939 "ext/dtext/dtext.c" if ( (*( sm->p)) == 93 ) goto tr191; goto st160; tr191: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } goto st161; st161: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof161; case 161: -#line 3946 "ext/dtext/dtext.c" +#line 3953 "ext/dtext/dtext.c" if ( (*( sm->p)) == 93 ) goto tr192; goto tr63; st162: if ( ++( sm->p) == ( sm->pe) ) @@ -4164,41 +4171,41 @@ goto st291; st291: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof291; case 291: -#line 4170 "ext/dtext/dtext.c" +#line 4177 "ext/dtext/dtext.c" if ( (*( sm->p)) == 116 ) goto st193; if ( 49 <= (*( sm->p)) && (*( sm->p)) <= 54 ) goto tr394; goto tr343; tr394: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st192; st192: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof192; case 192: -#line 4186 "ext/dtext/dtext.c" +#line 4193 "ext/dtext/dtext.c" if ( (*( sm->p)) == 46 ) goto tr224; goto tr63; tr224: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st292; st292: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof292; case 292: -#line 4200 "ext/dtext/dtext.c" +#line 4207 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 9: goto st292; case 32: goto st292; } goto tr396; @@ -4266,11 +4273,11 @@ goto st294; st294: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof294; case 294: -#line 4272 "ext/dtext/dtext.c" +#line 4279 "ext/dtext/dtext.c" if ( (*( sm->p)) == 123 ) goto st200; goto tr343; st200: if ( ++( sm->p) == ( sm->pe) ) @@ -4278,69 +4285,69 @@ case 200: if ( (*( sm->p)) == 125 ) goto tr63; goto tr232; tr232: -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st201; st201: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof201; case 201: -#line 4293 "ext/dtext/dtext.c" +#line 4300 "ext/dtext/dtext.c" if ( (*( sm->p)) == 125 ) goto tr234; goto st201; tr234: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st202; st202: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof202; case 202: -#line 4307 "ext/dtext/dtext.c" +#line 4314 "ext/dtext/dtext.c" if ( (*( sm->p)) == 125 ) goto tr235; goto tr63; tr236: -#line 634 "ext/dtext/dtext.rl" +#line 637 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ append_c_html_escaped(sm, (*( sm->p))); }} goto st295; tr241: -#line 620 "ext/dtext/dtext.rl" +#line 623 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_CODE)) { dstack_rewind(sm); } else { append(sm, true, "[/code]"); } { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st295; tr400: -#line 634 "ext/dtext/dtext.rl" +#line 637 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ append_c_html_escaped(sm, (*( sm->p))); }} goto st295; tr401: -#line 629 "ext/dtext/dtext.rl" +#line 632 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st295; tr403: -#line 634 "ext/dtext/dtext.rl" +#line 637 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append_c_html_escaped(sm, (*( sm->p))); }} goto st295; st295: @@ -4349,11 +4356,11 @@ if ( ++( sm->p) == ( sm->pe) ) goto _test_eof295; case 295: #line 1 "NONE" {( sm->ts) = ( sm->p);} -#line 4355 "ext/dtext/dtext.c" +#line 4362 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr401; case 91: goto tr402; } goto tr400; @@ -4363,11 +4370,11 @@ goto st296; st296: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof296; case 296: -#line 4369 "ext/dtext/dtext.c" +#line 4376 "ext/dtext/dtext.c" if ( (*( sm->p)) == 47 ) goto st203; goto tr403; st203: if ( ++( sm->p) == ( sm->pe) ) @@ -4403,17 +4410,17 @@ case 207: if ( (*( sm->p)) == 93 ) goto tr241; goto tr236; tr242: -#line 658 "ext/dtext/dtext.rl" +#line 661 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ append_c_html_escaped(sm, (*( sm->p))); }} goto st297; tr250: -#line 640 "ext/dtext/dtext.rl" +#line 643 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_NODTEXT)) { dstack_pop(sm); append_block(sm, "</p>"); { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} @@ -4424,24 +4431,24 @@ append(sm, true, "[/nodtext]"); } }} goto st297; tr405: -#line 658 "ext/dtext/dtext.rl" +#line 661 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ append_c_html_escaped(sm, (*( sm->p))); }} goto st297; tr406: -#line 653 "ext/dtext/dtext.rl" +#line 656 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st297; tr408: -#line 658 "ext/dtext/dtext.rl" +#line 661 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ append_c_html_escaped(sm, (*( sm->p))); }} goto st297; st297: @@ -4450,11 +4457,11 @@ if ( ++( sm->p) == ( sm->pe) ) goto _test_eof297; case 297: #line 1 "NONE" {( sm->ts) = ( sm->p);} -#line 4456 "ext/dtext/dtext.c" +#line 4463 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr406; case 91: goto tr407; } goto tr405; @@ -4464,11 +4471,11 @@ goto st298; st298: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof298; case 298: -#line 4470 "ext/dtext/dtext.c" +#line 4477 "ext/dtext/dtext.c" if ( (*( sm->p)) == 47 ) goto st208; goto tr408; st208: if ( ++( sm->p) == ( sm->pe) ) @@ -4525,15 +4532,15 @@ case 215: if ( (*( sm->p)) == 93 ) goto tr250; goto tr242; tr251: -#line 733 "ext/dtext/dtext.rl" +#line 736 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}} goto st299; tr260: -#line 718 "ext/dtext/dtext.rl" +#line 721 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_TABLE)) { dstack_pop(sm); append_block(sm, "</table>"); { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} @@ -4541,51 +4548,51 @@ append(sm, true, "[/table]"); } }} goto st299; tr264: -#line 683 "ext/dtext/dtext.rl" +#line 686 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_TBODY)) { dstack_pop(sm); append_block(sm, "</tbody>"); } else { append(sm, true, "[/tbody]"); } }} goto st299; tr268: -#line 669 "ext/dtext/dtext.rl" +#line 672 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_THEAD)) { dstack_pop(sm); append_block(sm, "</thead>"); } else { append(sm, true, "[/thead]"); } }} goto st299; tr269: -#line 703 "ext/dtext/dtext.rl" +#line 706 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ if (dstack_check(sm, BLOCK_TR)) { dstack_pop(sm); append_block(sm, "</tr>"); } else { append(sm, true, "[/tr]"); } }} goto st299; tr277: -#line 678 "ext/dtext/dtext.rl" +#line 681 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &BLOCK_TBODY); append_block(sm, "<tbody>"); }} goto st299; tr278: -#line 712 "ext/dtext/dtext.rl" +#line 715 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &BLOCK_TD); append_block(sm, "<td>"); { size_t len = sm->stack->len; @@ -4600,11 +4607,11 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 299; goto st260;}} }} goto st299; tr279: -#line 692 "ext/dtext/dtext.rl" +#line 695 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &BLOCK_TH); append_block(sm, "<th>"); { size_t len = sm->stack->len; @@ -4619,47 +4626,47 @@ } {( ((int *)sm->stack->data))[( sm->top)++] = 299; goto st260;}} }} goto st299; tr283: -#line 664 "ext/dtext/dtext.rl" +#line 667 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &BLOCK_THEAD); append_block(sm, "<thead>"); }} goto st299; tr284: -#line 698 "ext/dtext/dtext.rl" +#line 701 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_push(sm, &BLOCK_TR); append_block(sm, "<tr>"); }} goto st299; tr410: -#line 733 "ext/dtext/dtext.rl" +#line 736 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;} goto st299; tr411: -#line 728 "ext/dtext/dtext.rl" +#line 731 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st299; tr413: -#line 733 "ext/dtext/dtext.rl" +#line 736 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;} goto st299; st299: #line 1 "NONE" {( sm->ts) = 0;} if ( ++( sm->p) == ( sm->pe) ) goto _test_eof299; case 299: #line 1 "NONE" {( sm->ts) = ( sm->p);} -#line 4661 "ext/dtext/dtext.c" +#line 4668 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr411; case 91: goto tr412; } goto tr410; @@ -4669,11 +4676,11 @@ goto st300; st300: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof300; case 300: -#line 4675 "ext/dtext/dtext.c" +#line 4682 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 47: goto st216; case 116: goto st231; } goto tr413; @@ -4884,47 +4891,47 @@ break; } } goto st301; tr287: -#line 784 "ext/dtext/dtext.rl" +#line 787 "ext/dtext/dtext.rl" {{( sm->p) = ((( sm->te)))-1;}{ dstack_rewind(sm); ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st301; tr416: -#line 784 "ext/dtext/dtext.rl" +#line 787 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_rewind(sm); ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st301; tr417: -#line 776 "ext/dtext/dtext.rl" +#line 779 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p)+1;{ dstack_close_list(sm); {( sm->p) = (( sm->ts))-1;} { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st301; tr422: -#line 784 "ext/dtext/dtext.rl" +#line 787 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ dstack_rewind(sm); ( sm->p)--; { sm->cs = ( ((int *)sm->stack->data))[--( sm->top)];goto _again;} }} goto st301; tr423: -#line 107 "ext/dtext/dtext.rl" +#line 108 "ext/dtext/dtext.rl" { sm->b2 = sm->p; } -#line 737 "ext/dtext/dtext.rl" +#line 740 "ext/dtext/dtext.rl" {( sm->te) = ( sm->p);( sm->p)--;{ int prev_nest = sm->list_nest; append_closing_p_if(sm); g_debug("list start"); sm->list_mode = true; @@ -4978,35 +4985,35 @@ if ( ++( sm->p) == ( sm->pe) ) goto _test_eof301; case 301: #line 1 "NONE" {( sm->ts) = ( sm->p);} -#line 4984 "ext/dtext/dtext.c" +#line 4991 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr417; case 10: goto tr418; case 13: goto st303; case 42: goto tr420; } goto tr416; tr286: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 776 "ext/dtext/dtext.rl" +#line 779 "ext/dtext/dtext.rl" {( sm->act) = 64;} goto st302; tr418: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 782 "ext/dtext/dtext.rl" +#line 785 "ext/dtext/dtext.rl" {( sm->act) = 65;} goto st302; st302: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof302; case 302: -#line 5008 "ext/dtext/dtext.c" +#line 5015 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 10: goto tr286; case 13: goto st242; } goto tr285; @@ -5025,73 +5032,73 @@ goto tr418; goto tr422; tr420: #line 1 "NONE" {( sm->te) = ( sm->p)+1;} -#line 95 "ext/dtext/dtext.rl" +#line 96 "ext/dtext/dtext.rl" { sm->a1 = sm->p; } goto st304; st304: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof304; case 304: -#line 5040 "ext/dtext/dtext.c" +#line 5047 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 9: goto tr290; case 32: goto tr290; case 42: goto st244; } goto tr422; tr290: -#line 99 "ext/dtext/dtext.rl" +#line 100 "ext/dtext/dtext.rl" { sm->a2 = sm->p; } goto st243; st243: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof243; case 243: -#line 5057 "ext/dtext/dtext.c" +#line 5064 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr287; case 9: goto tr289; case 10: goto tr287; case 13: goto tr287; case 32: goto tr289; } goto tr288; tr288: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st305; st305: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof305; case 305: -#line 5076 "ext/dtext/dtext.c" +#line 5083 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr423; case 10: goto tr423; case 13: goto tr423; } goto st305; tr289: -#line 103 "ext/dtext/dtext.rl" +#line 104 "ext/dtext/dtext.rl" { sm->b1 = sm->p; } goto st306; st306: if ( ++( sm->p) == ( sm->pe) ) goto _test_eof306; case 306: -#line 5093 "ext/dtext/dtext.c" +#line 5100 "ext/dtext/dtext.c" switch( (*( sm->p)) ) { case 0: goto tr423; case 9: goto tr289; case 10: goto tr423; case 13: goto tr423; @@ -5725,14 +5732,15 @@ } } } -#line 1315 "ext/dtext/dtext.rl" +#line 1324 "ext/dtext/dtext.rl" dstack_close(sm); - ret = rb_str_new(sm->output->str, sm->output->len); + encoding = rb_enc_find("utf-8"); + ret = rb_enc_str_new(sm->output->str, sm->output->len, encoding); free_machine(sm); return ret; }