Skip to content

Commit 6ff2c78

Browse files
add image with subs to subs test
1 parent 2c73209 commit 6ff2c78

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

tests/Elastic.Markdown.Tests/Inline/SubstitutionTest.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,43 @@ public void OnlySeesGlobalVariable() =>
165165
public void HasNoErrors() => Collector.Diagnostics.Should().HaveCount(0);
166166

167167
}
168+
169+
public class ReplaceInImageAlt(ITestOutputHelper output) : InlineTest(output,
170+
"""
171+
---
172+
sub:
173+
hello-world: Hello World
174+
---
175+
176+
# Testing ReplaceInImageAlt
177+
178+
![{{hello-world}}](_static/img/observability.png)
179+
"""
180+
)
181+
{
182+
183+
[Fact]
184+
public void OnlySeesGlobalVariable() =>
185+
Html.Should().NotContain("alt=\"{{hello-world}}\"")
186+
.And.Contain("alt=\"Hello World\"");
187+
}
188+
189+
public class ReplaceInImageTitle(ITestOutputHelper output) : InlineTest(output,
190+
"""
191+
---
192+
sub:
193+
hello-world: Hello World
194+
---
195+
196+
# Testing ReplaceInImageTitle
197+
198+
![Observability](_static/img/observability.png "{{hello-world}}")
199+
"""
200+
)
201+
{
202+
203+
[Fact]
204+
public void OnlySeesGlobalVariable() =>
205+
Html.Should().NotContain("title=\"{{hello-world}}\"")
206+
.And.Contain("title=\"Hello World\"");
207+
}

0 commit comments

Comments
 (0)