Skip to content

Commit 18a4264

Browse files
committed
Make this compile in VS 2015 'cause I don't have 2017 here right now
1 parent 19e0fea commit 18a4264

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/Markdig.Wpf/Renderers/WpfRenderer.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,13 @@ private static bool StartsWithSpace([NotNull] Inline inline)
177177
{
178178
while (true)
179179
{
180-
if (inline is Run run)
180+
var run = inline as Run;
181+
if (run != null)
181182
{
182183
return run.Text.Length == 0 || run.Text.First().IsWhitespace();
183184
}
184-
if (inline is Span span)
185+
var span = inline as Span;
186+
if (span != null)
185187
{
186188
inline = span.Inlines.FirstInline;
187189
continue;
@@ -196,12 +198,13 @@ private static bool EndsWithSpace([NotNull] IAddChild element)
196198
while (true)
197199
{
198200
var inlines = (element as Span)?.Inlines ?? (element as Paragraph)?.Inlines;
199-
200-
if (inlines?.LastInline is Run run)
201+
var run = inlines?.LastInline as Run;
202+
if (run != null)
201203
{
202204
return run.Text.Length == 0 || run.Text.Last().IsWhitespace();
203205
}
204-
if (inlines?.LastInline is Span span)
206+
var span = inlines?.LastInline as Span;
207+
if (span != null)
205208
{
206209
element = span;
207210
continue;

0 commit comments

Comments
 (0)