File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,8 +35,11 @@ from md2bbcode.main import process_readme
3535# Your Markdown content
3636markdown_text = " # Hell World"
3737
38+ # Optional domain to prepend to relative URLs
39+ domain = ' https://raw.githubusercontent.com/yourusername/yourrepo/main/'
40+
3841# Convert Markdown to BBCode
39- bbcode_output = process_readme(markdown_text)
42+ bbcode_output = process_readme(markdown_text, domain = domain )
4043
4144# Output the BBCode
4245print (bbcode_output)
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def convert_markdown_to_bbcode(markdown_text, domain):
2727 # Convert Markdown text to BBCode
2828 return markdown_parser (markdown_text )
2929
30- def process_readme (markdown_text , domain , debug = False ):
30+ def process_readme (markdown_text , domain = None , debug = False ):
3131 # Convert Markdown to BBCode
3232 bbcode_text = convert_markdown_to_bbcode (markdown_text , domain )
3333
You can’t perform that action at this time.
0 commit comments