MarkdownViewer: use HasFlag and NSRunLoop.Main

Instead of NSRunLoop.Current