Skip to content

Commit f4b2d51

Browse files
authored
Merge branch 'main' into fix/versioning_dropdown
2 parents cc2e6ff + 51fe504 commit f4b2d51

File tree

3 files changed

+122
-11
lines changed

3 files changed

+122
-11
lines changed

config/versions.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ versioning_systems:
4747
current: 2.7.2
4848
apm-agent-java:
4949
base: 1.0
50-
current: 1.55.1
50+
current: 1.55.2
5151
apm-agent-node:
5252
base: 4.0
5353
current: 4.15.0
@@ -82,10 +82,10 @@ versioning_systems:
8282
current: 1.4.0
8383
edot-dotnet:
8484
base: 1.0
85-
current: 1.1.0
85+
current: 1.2.0
8686
edot-java:
8787
base: 1.0
88-
current: 1.7.0
88+
current: 1.8.0
8989
edot-node:
9090
base: 1.0
9191
current: 1.7.0
@@ -94,10 +94,10 @@ versioning_systems:
9494
current: 1.2.0
9595
edot-python:
9696
base: 1.0
97-
current: 1.10.0
97+
current: 1.10.2
9898
edot-cf-aws:
9999
base: 0.1
100-
current: 0.2.6
100+
current: 1.0.0
101101
edot-cf-azure:
102102
base: 0.1
103103
current: 0.6.0
@@ -164,7 +164,7 @@ versioning_systems:
164164
current: 9.2.0
165165
elasticsearch-client-rust:
166166
base: 9.0
167-
current: 9.1.0
167+
current: 9.1.0-alpha.1
168168
# Other
169169
cloud-terraform:
170170
base: 0.11

src/Elastic.Markdown/Myst/Renderers/LlmMarkdown/LlmBlockRenderers.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,13 @@ private static int[] CalculateColumnWidths(LlmMarkdownRenderer renderer, Table t
382382
private static string RenderTableCellContent(LlmMarkdownRenderer renderer, TableCell cell) =>
383383
DocumentationObjectPoolProvider.UseLlmMarkdownRenderer(
384384
renderer.BuildContext,
385-
cell.Descendants().OfType<Inline>(),
386-
static (tmpRenderer, obj) =>
385+
cell,
386+
static (tmpRenderer, c) =>
387387
{
388-
foreach (var inline in obj)
389-
tmpRenderer.Write(inline);
390-
});
388+
// Render the cell's child blocks (e.g., ParagraphBlock) which properly
389+
// handles the inline hierarchy without duplicating nested inline content
390+
tmpRenderer.WriteChildren(c);
391+
}).Trim();
391392
}
392393

393394
public class LlmDirectiveRenderer : MarkdownObjectRenderer<LlmMarkdownRenderer, DirectiveBlock>

tests/authoring/LlmMarkdown/LlmMarkdownOutput.fs

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,3 +641,113 @@ Another setting description.
641641

642642
An advanced option.
643643
"""
644+
645+
type ``links in paragraphs`` () =
646+
static let markdown = Setup.Document """
647+
This is a paragraph with a [link to docs](https://www.elastic.co/docs/deploy-manage/security) in it.
648+
"""
649+
650+
[<Fact>]
651+
let ``renders links without duplication`` () =
652+
markdown |> convertsToNewLLM """This is a paragraph with a [link to docs](https://www.elastic.co/docs/deploy-manage/security) in it.
653+
"""
654+
655+
type ``links in tables`` () =
656+
static let markdown = Setup.Document """
657+
| Feature | Availability |
658+
|---------|--------------|
659+
| [Security configurations](https://www.elastic.co/docs/deploy-manage/security) | Full control |
660+
| [Authentication realms](https://www.elastic.co/docs/deploy-manage/users-roles) | Available |
661+
"""
662+
663+
[<Fact>]
664+
let ``renders links in table cells without duplication`` () =
665+
markdown |> convertsToNewLLM """
666+
| Feature | Availability |
667+
|--------------------------------------------------------------------------------|--------------|
668+
| [Security configurations](https://www.elastic.co/docs/deploy-manage/security) | Full control |
669+
| [Authentication realms](https://www.elastic.co/docs/deploy-manage/users-roles) | Available |
670+
"""
671+
672+
type ``multiple links in table cells`` () =
673+
static let markdown = Setup.Document """
674+
| Feature | Links |
675+
|---------|-------|
676+
| Security | [Config](https://example.com/config) and [Auth](https://example.com/auth) |
677+
"""
678+
679+
[<Fact>]
680+
let ``renders multiple links in same cell without duplication`` () =
681+
markdown |> convertsToNewLLM """
682+
| Feature | Links |
683+
|----------|---------------------------------------------------------------------------|
684+
| Security | [Config](https://example.com/config) and [Auth](https://example.com/auth) |
685+
"""
686+
687+
type ``links with formatting in tables`` () =
688+
static let markdown = Setup.Document """
689+
| Feature | Description |
690+
|---------|-------------|
691+
| [**Bold link**](https://example.com) | Description |
692+
| [*Italic link*](https://example.com/italic) | Another |
693+
"""
694+
695+
[<Fact>]
696+
let ``renders formatted links in table cells correctly`` () =
697+
markdown |> convertsToNewLLM """
698+
| Feature | Description |
699+
|---------------------------------------------|-------------|
700+
| [**Bold link**](https://example.com) | Description |
701+
| [*Italic link*](https://example.com/italic) | Another |
702+
"""
703+
704+
type ``bold and italic in tables`` () =
705+
static let markdown = Setup.Document """
706+
| Format | Example |
707+
|--------|---------|
708+
| Bold | This is **bold text** here |
709+
| Italic | This is *italic text* here |
710+
| Both | This is **bold** and *italic* |
711+
"""
712+
713+
[<Fact>]
714+
let ``renders bold and italic in table cells without duplication`` () =
715+
markdown |> convertsToNewLLM """
716+
| Format | Example |
717+
|--------|-------------------------------|
718+
| Bold | This is **bold text** here |
719+
| Italic | This is *italic text* here |
720+
| Both | This is **bold** and *italic* |
721+
"""
722+
723+
type ``code inline in tables`` () =
724+
static let markdown = Setup.Document """
725+
| Command | Description |
726+
|---------|-------------|
727+
| `git status` | Shows status |
728+
| `git commit` | Commits changes |
729+
"""
730+
731+
[<Fact>]
732+
let ``renders code inline in table cells correctly`` () =
733+
markdown |> convertsToNewLLM """
734+
| Command | Description |
735+
|--------------|-----------------|
736+
| `git status` | Shows status |
737+
| `git commit` | Commits changes |
738+
"""
739+
740+
type ``images in tables`` () =
741+
static let markdown = Setup.Document """
742+
| Icon | Name |
743+
|------|------|
744+
| ![logo](https://example.com/logo.png) | Logo |
745+
"""
746+
747+
[<Fact>]
748+
let ``renders images in table cells without duplication`` () =
749+
markdown |> convertsToNewLLM """
750+
| Icon | Name |
751+
|---------------------------------------|------|
752+
| ![logo](https://example.com/logo.png) | Logo |
753+
"""

0 commit comments

Comments
 (0)