Skip to content

Conversation

@theletterf
Copy link
Contributor

@theletterf theletterf commented Jan 22, 2026

This adds Markdown rendering support to the CSV include directive.

Some notes:

  • NormalizeCsvCellMarkdown + IsPlainUrl: These exist because the main MarkdownParser.Pipeline doesn't include UseAutoLinks(). If we added .UseAutoLinks() to the pipeline, bare URLs would automatically become links and these two methods could be deleted. However, that's a global change that might affect other content unexpectedly.
  • RenderInlineMarkdown: This avoids wrapping single-paragraph content in <p> tags inside table cells. Without it, **Bold** would render as <td><p><strong>Bold</strong></p></td> instead of <td><strong>Bold</strong></td>.

The most impactful simplification would be adding UseAutoLinks() to the main pipeline, which would eliminate NormalizeCsvCellMarkdown and IsPlainUrl entirely. The inline rendering optimization is CSV/table-specific.

Update
Removing autolinks as an exception from the PR so I can open a separate PR just for autolinks.
——

LLM disclosure: I've used GPT Codex 5.2 and Claude Opus 4.5 in Cursor.

@github-actions
Copy link

github-actions bot commented Jan 22, 2026

🔍 Preview links for changed docs

Copy link
Contributor

@shainaraskas shainaraskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice nice nice this is awesome

@Mpdreamz
Copy link
Member

I am not opposed to adding autolink.

We should poll all docs tech leads.

@shainaraskas
Copy link
Contributor

poll all docs tech leads

I wish we had it because mostly not having it introduces bugs for us (people putting in plain links without us noticing)

cc @florent-leborgne + @szabosteve

@reakaleek
Copy link
Member

reakaleek commented Jan 22, 2026

Is it working?

https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/2532/syntax/csv-include.md

The output shows an empty tag

  <csv-include>
  </csv-include>

// edit:

Ah, I just noticed.. this is about rendering markdown from CSV cells.

I guess I found a bug.

// edit 2:

@florent-leborgne
Copy link
Contributor

Autolinks were the default in asciidoc and it was handy so people are used to it and I'm all for it, we'd just need to make sure it's deactivated where needed (code snippets & co)

@theletterf
Copy link
Contributor Author

I'm removing autolinks as an exception from this PR to avoid mixing two features and will open a separate PR to add and test autolinks where it makes sense, if that's OK.

@theletterf
Copy link
Contributor Author

@elastic/docs-engineering Moved the autolinks bits to #2541

With that, I think this one is ready for prime time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants