End byte of the section that cmds[ci] (a =head or =item) opens * (extract_defs.c's pod_section_end). */
| 853 | /* End byte of the section that cmds[ci] (a =head or =item) opens |
| 854 | * (extract_defs.c's pod_section_end). */ |
| 855 | static uint32_t pl_section_end(const pl_cmd_t *cmds, int n, int ci, uint32_t pe) { |
| 856 | const pl_cmd_t *c = &cmds[ci]; |
| 857 | for (int j = ci + SKIP_ONE; j < n; j++) { |
| 858 | const pl_cmd_t *d = &cmds[j]; |
| 859 | if (d->type == PL_CUT) { |
| 860 | return d->sb; |
| 861 | } |
| 862 | if (d->type == PL_HEAD && (c->type == PL_ITEM || d->level <= c->level)) { |
| 863 | return d->sb; |
| 864 | } |
| 865 | if (c->type == PL_ITEM && (d->type == PL_ITEM || d->type == PL_BACK) && |
| 866 | d->level == c->level) { |
| 867 | return d->sb; |
| 868 | } |
| 869 | } |
| 870 | return pe; |
| 871 | } |
| 872 | |
| 873 | /* A heading's text with formatting codes removed and newlines and tabs as |
| 874 | * spaces (extract_defs.c's pod_plain_heading, byte for byte: the name it |