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

Fix rendering anchor ref IDs (heading IDs) (#565) #581

Open
wants to merge 169 commits into
base: master
Choose a base branch
from

Conversation

travkin79
Copy link
Contributor

I think, I fixed the bug described in discussion #565.

There's only one question left: The test suite ExtAttributesTestSuite fails in the case "example(Anchor Targets - Cond 4.1: 3) options(anchors)", see comparison of expected and actual output. Shouldn't the id in this case only be placed in the h1 tag?

image

vsch and others added 28 commits April 28, 2023 18:59
Fix vsch#545, do not escape special characters in `<pre><code>` block
Fix vsch#548: Converting html images fails if the image refers to an emoji without a shortcut
* Stop creating HTML ID generator if generateHeaderId = false (and renderHeaderID = true)

* Ensure header ID is not empty
* Avoid duplicated setLastNode(..) call

The call was happening first irrespective of whether the node was a TextContainer so lifted this logic out of the `if` block.

* Avoid duplicate LineBreakNode logic

It seems that currently LineBreakNode is independant of TextContainer so it seems safe to pull that out of the `if` block.

* Paragraph with trailing blank line collects trailing blank line

Consequently only a single new line is needed to add paragraph breaks

* Collect a blank line before all (except first) Block instances

- Removed special case logic for Paragraph blocks
- Generalised from BlankLineBreakNode case

* IndentedCodeBlock implements TextContainer

Implementation based on Text collectText(..) but using getContentChars()
@travkin79
Copy link
Contributor Author

Hi @vsch,
Could you please check and merge this PR? Thank you very much.

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.

None yet