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

Fixed a bug in HeadingRenderer #402

Merged
merged 1 commit into from
Mar 8, 2020

Conversation

KrisVandermotten
Copy link
Contributor

The rendered HTML for Heading level 7 and above was incorrect.

This PR fixes that.

In addition, a minor optimization removes the range check over the array bounds.

@MihaZupan
Copy link
Collaborator

In addition, a minor optimization removes the range check over the array bounds.

Sadly I don't think it does, unless you save HeadingTexts to a local first.

@KrisVandermotten
Copy link
Contributor Author

Sadly I don't think it does, unless you save HeadingTexts to a local first.

Actually I think it will, at least on some runtimes, because the field is static readonly, though I must admit I didn't verify. Eliminating the range check wasn't the point of the PR.

And even if the range check doesn't get eliminated, at least two comparisons have been replaced by one. 🙂

@xoofx xoofx merged commit da916a1 into xoofx:master Mar 8, 2020
@KrisVandermotten KrisVandermotten deleted the HeadingRendererBugFix branch March 8, 2020 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants