Skip to content

Improve Index section detection #1

@davorpa

Description

@davorpa

Resolve this TODOS across localized files

// find where Index ends
// probably could be done better, review later
let i = 0,
count = 0;
for (i; i < tree.length; i++) {
if (tree[i].type == "heading" && tree[i].depth == "3") count++;
if (count == 2) break;
}
tree.slice(i).forEach((item) => {
// Start iterating after Index
try {
if (item.type == "heading" && item.children[0].value == "Index") return;
if (item.type == "heading") {

part of EbookFoundation/free-programming-books#6988 (comment)

Index word is not translated according to file locale. E.g.:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions