| 3 |
* lml |
* lml |
| 4 |
* - LML render |
* - LML render |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| 187 |
|
|
| 188 |
for (i = 0; i < lml_tag_count; i++) |
for (i = 0; i < lml_tag_count; i++) |
| 189 |
{ |
{ |
| 190 |
for (j = 0; j < LML_TAG_NAME_BUF_LEN - 1 && lml_tag_def[i].tag_name[j] != '\0'; j++) |
for (j = 0; j < sizeof(tag_name_buf) - 1 && lml_tag_def[i].tag_name[j] != '\0'; j++) |
| 191 |
{ |
{ |
| 192 |
tag_name_buf[j] = (char)tolower(lml_tag_def[i].tag_name[j]); |
tag_name_buf[j] = (char)tolower(lml_tag_def[i].tag_name[j]); |
| 193 |
} |
} |
| 409 |
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, tab_spaces, tab_width, line_width); |
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, tab_spaces, tab_width, line_width); |
| 410 |
continue; |
continue; |
| 411 |
} |
} |
| 412 |
|
else if (!quote_mode && str_in[i] == '\033') |
| 413 |
|
{ |
| 414 |
|
continue; // Skip control characters while not in quote mode |
| 415 |
|
} |
| 416 |
|
|
| 417 |
if (!lml_tag_disabled && str_in[i] == '[') |
if (!lml_tag_disabled && str_in[i] == '[') |
| 418 |
{ |
{ |
| 447 |
tag_name_pos++; |
tag_name_pos++; |
| 448 |
} |
} |
| 449 |
|
|
| 450 |
for (k = 0; k < LML_TAG_NAME_BUF_LEN - 1 && tag_name_pos + k < tag_end_pos; k++) |
for (k = 0; k < sizeof(tag_name_buf) - 1 && tag_name_pos + k < tag_end_pos; k++) |
| 451 |
{ |
{ |
| 452 |
if (str_in[tag_name_pos + k] == ' ' || str_in[tag_name_pos + k] == ']') |
if (str_in[tag_name_pos + k] == ' ' || str_in[tag_name_pos + k] == ']') |
| 453 |
{ |
{ |