Skip to content

Link checker fails on anchor links within other elements #285

@bmorelli25

Description

@bmorelli25

Summary

I'm seeing the following error when building the ES Guide:

Error: `es-connectors-s3-usage-create-iam` does not exist in es-connectors-s3.md.
     ┌─[/Users/brandon/Documents/GitHub/elasticsearch.md/docs/es-connectors-s3.md]
     │
 124 │ S3 users will also need to [Create an IAM identity](es-connectors-s3.md#es-connectors-s3-usage-create-iam)
     ·                           ─────────────────────────────────────────────────────                           
     ·                                                                                                            
     │
     └─

This error indicates that:

  1. in the /es-connectors-s3.md file
  2. there is a link to es-connectors-s3.md#es-connectors-s3-usage-create-iam
    I can verify this is correct: Image

However, the link checker fails saying that the anchor does not exist. This is happening because the anchor lives inside of a collapsable block. Note that the anchors do work just fine when clicked on the page:

Image

Steps to repro

  1. dotnet publish "src/docs-builder/docs-builder.csproj" && ./.artifacts/publish/docs-builder/release/docs-builder serve -p ../elasticsearch.md
  2. Visit http://localhost:3000/es-connectors-s3.html#es-connectors-s3-usage-create-iam

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions