From 013f6cbc3fc43f2706914090811519a42636bea4 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Wed, 15 Feb 2023 09:43:21 +0000 Subject: [PATCH] Allow the markdown example to be run outside of examples directory --- examples/markdown.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/markdown.py b/examples/markdown.py index 59eaea9e3..e2f1fc020 100644 --- a/examples/markdown.py +++ b/examples/markdown.py @@ -1,3 +1,5 @@ +from pathlib import Path + from textual.app import App, ComposeResult from textual.reactive import var from textual.widgets import Footer, MarkdownViewer @@ -10,7 +12,7 @@ class MarkdownApp(App): ("f", "forward", "Forward"), ] - path = var("demo.md") + path = var(str(Path(__file__).parent / "demo.md")) @property def markdown_viewer(self) -> MarkdownViewer: