Skip to content

Conversation

@theletterf
Copy link
Contributor

Fixes #1658

@theletterf theletterf requested review from a team as code owners July 30, 2025 20:31
@theletterf theletterf changed the title Theletterf allow subs in stepper headings Allow subs in stepper headings Jul 30, 2025
@theletterf theletterf self-assigned this Jul 30, 2025
@theletterf theletterf added the fix label Jul 30, 2025
@github-actions
Copy link

github-actions bot commented Jul 30, 2025

🔍 Preview links for changed docs

@theletterf
Copy link
Contributor Author

@theletterf
Copy link
Contributor Author

@elastic/docs-engineering Please have a look — thanks!

@reakaleek
Copy link
Member

reakaleek commented Aug 1, 2025

I'm wondering if we could use the actual HTML renderer for rendering the heading.

This would then cover all the things.

@theletterf
Copy link
Contributor Author

@reakaleek PTAL!

@reakaleek
Copy link
Member

@reakaleek PTAL!

Ah, sorry for being ambiguous. I meant like.. the markdig renderer. So that all markdown syntax is covered.

@Mpdreamz
Copy link
Member

Mpdreamz commented Aug 1, 2025

We already override parsing headers here:

https://github.com/elastic/docs-builder/blob/e19ef301a0a718042a074b5e314db9d4f8c2f8fc/src/Elastic.Markdown/Myst/InlineParsers/HeadingBlockWithSlugParser.cs#L25-L24

But no custom renderer yet.. Not sure we need it as the headers are already parsed and pick up subs.

@Mpdreamz
Copy link
Member

Mpdreamz commented Aug 1, 2025

But not sure I understand completely @reakaleek the stepper circumvents markdown headers by using its own renderer? You want the renderer to call the default markdown header renderer which already parses and replaces subs? instead of using <hN> for the directive?

@reakaleek
Copy link
Member

But not sure I understand completely @reakaleek the stepper circumvents markdown headers by using its own renderer? You want the renderer to call the default markdown header renderer which already parses and replaces subs? instead of using <hN> for the directive?

I think we could either recursively, or use the existing static markdown pipeline to render the LeafInline or something like that.

That way the heading would support all the things our markdown supports.

@reakaleek
Copy link
Member

@reakaleek Is 055f622 the answer? 🙏🏻

I'm not sure.. if what I'm trying to convey would work.. you could remove the custom ReplaceSubstitutions logic and the markdig renderer would handle it.

@theletterf
Copy link
Contributor Author

@Mpdreamz @reakaleek I think it's ready now!

@theletterf theletterf merged commit 4d27a2d into main Aug 1, 2025
18 checks passed
@theletterf theletterf deleted the theletterf-allow-subs-in-stepper-headings branch August 1, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Allow substitutions in stepper step titles

4 participants