Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left-out headers not shown as zero #18

Open
flaushi opened this issue Mar 30, 2021 · 0 comments
Open

Left-out headers not shown as zero #18

flaushi opened this issue Mar 30, 2021 · 0 comments
Assignees
Labels

Comments

@flaushi
Copy link

flaushi commented Mar 30, 2021

Assume I have a document like

1. Heading h1
2. Heading two h1
2.1 First H2
3. Third H1
3.0.1 First H3 (H2 is missing)

Then the output of the lib is

1. Heading h1
2. Heading two h1
2.1 First H2
3. Third H1
3.1 3.1.1 First H3 (H2 is missing)

Can I fix this just with an option?
My problem I guess is the "empty" li that is created and counts. It increments the leftout layer and gives the 1 instead of 0.

My corresponding css does behave as I'd like:


.toc ol {
			list-style-type: none;
			counter-reset: item;
			margin: 0;
			padding: 0;
		}


		.toc ol > li:before  {
            counter-increment: item;
            margin: 0;
            padding: 0;
			content: counters(item, ".") ". ";

		}

.report-content {
  counter-reset: h1counter;
}

.report-content  h1  {
    counter-increment: h1counter;
    counter-reset: h2counter h3counter h4counter;
}

.report-content h1:before {
    content: counters(h1counter, ".") " ";
    margin-right: 10px;
}

.report-content  h2 {
  counter-increment: h2counter;
  counter-reset: h3counter h4counter ;
}

.report-content  h2:before {
  content: counters(h1counter, ".") "." counters(h2counter, ".") " ";
  margin-right: 10px;
}

.report-content  h3 {
  counter-increment: h3counter;
  counter-reset: h4counter;
}

.report-content  h3:before {
    content: counters(h1counter, ".") "." counters(h2counter, ".") "." counters(h3counter, ".") " ";
    margin-right: 10px;
}
@caseyamcl caseyamcl self-assigned this Apr 14, 2021
@caseyamcl caseyamcl added the bug label Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants