diff --git a/MarkdownLivePreview.sublime-package b/MarkdownLivePreview.sublime-package index 51a5fd3..ddd598e 100644 Binary files a/MarkdownLivePreview.sublime-package and b/MarkdownLivePreview.sublime-package differ diff --git a/create_package.sh b/create_package.sh new file mode 100755 index 0000000..d8af8a9 --- /dev/null +++ b/create_package.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +git archive --format=zip --prefix="" --output=MarkdownLivePreview.sublime-package master +git add MarkdownLivePreview.sublime-package +git commit -m "Update package" +git push origin master \ No newline at end of file diff --git a/test_imports.py b/test_imports.py new file mode 100644 index 0000000..c4642ad --- /dev/null +++ b/test_imports.py @@ -0,0 +1,40 @@ +# test_imports.py +import sys +import os + +# Optional: Explicitly add project root to path if needed, +# although running from the root often suffices. +# project_root = os.path.dirname(__file__) +# if project_root not in sys.path: +# sys.path.insert(0, project_root) + +print("Attempting imports...") +try: + # Try importing the main entry point for bs4 from the lib structure + from lib.bs4 import BeautifulSoup + print("- Successfully imported BeautifulSoup from lib.bs4") + + # Try creating a simple soup object (tests basic bs4 internal imports) + soup = BeautifulSoup("", "html.parser") + print(f"- Created soup object: {soup.a}") + + # Try importing the main entry point for soupsieve + from lib.soupsieve import compile as soupsieve_compile + print("- Successfully imported compile from lib.soupsieve") + + # Try compiling a simple selector (tests basic soupsieve internal imports) + compiled = soupsieve_compile("a") + print(f"- Compiled selector: {compiled.pattern}") + + # Try using the selector (tests soupsieve -> bs4 interaction) + match = compiled.select_one(soup) + print(f"- Selector match: {match}") + + print("\nBasic import and usage tests passed!") + +except ImportError as e: + print(f"\nImport Error: {e}") + print("Failed to import. Check paths and internal library structure.") +except Exception as e: + print(f"\nRuntime Error: {e}") + print("Imports might have worked, but usage failed.")