Skip to content

Commit 776c6f7

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 25d2b05 + 421354a commit 776c6f7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

flexmark/src/main/java/com/vladsch/flexmark/html/HtmlRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ public void dispose() {
541541
this.myLinkResolvers = new LinkResolver[linkResolverFactories.size()];
542542
this.doNotRenderLinksNesting = htmlOptions.doNotRenderLinksInDocument ? 0 : 1;
543543
this.htmlIdGenerator = htmlIdGeneratorFactory != null ? htmlIdGeneratorFactory.create(this)
544-
: (!(htmlOptions.renderHeaderId || htmlOptions.generateHeaderIds) ? HtmlIdGenerator.NULL : new HeaderIdGenerator.Factory().create(this));
544+
: (!(htmlOptions.generateHeaderIds) ? HtmlIdGenerator.NULL : new HeaderIdGenerator.Factory().create(this));
545545

546546
htmlWriter.setContext(this);
547547

flexmark/src/main/java/com/vladsch/flexmark/html/renderer/CoreNodeRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void render(Document node, NodeRendererContext context, HtmlWriter html) {
117117
void render(Heading node, NodeRendererContext context, HtmlWriter html) {
118118
if (context.getHtmlOptions().renderHeaderId) {
119119
String id = context.getNodeId(node);
120-
if (id != null) {
120+
if (id != null && id.length() > 0) {
121121
html.attr("id", id);
122122
}
123123
}

0 commit comments

Comments
 (0)