Skip to content

Add links to examples paragraphs #13205

@stoyanK7

Description

@stoyanK7

From #13112 (comment)

As the discussion in discord, should these PRs add the ID to connect the xdoc and input together?

This is a good idea but I cannot add id prop directly to a source tag

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project checkstyle: Error parsing '/home/stoyan/open-source/checkstyle/src/xdocs/config_blocks.xml': Error validating the model: Error: [ERROR] Public ID: null [ERROR] System ID: null [ERROR] Line number: 85 [ERROR] Column number: 26 [ERROR] Message: cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'source'. 

An option here is to create an invisible div above the example.

+ <div id="Example1.config" style="display:none;"></div> <source> &lt;module name=&quot;AvoidNestedBlocks&quot;/&gt; </source>

In addition to this, I see there is a task at Xdoc generation to investigate the ability to set links for any place we think.

Why don't we combine those two?

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions