mirror of
https://github.com/markqvist/Sideband.git
synced 2026-11-24 17:06:21 -05:00
Always use local markdown library
This commit is contained in:
parent
587773ace4
commit
1bf11aca6f
4 changed files with 15 additions and 7 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#standard library
|
||||
import argparse
|
||||
import sys
|
||||
import RNS
|
||||
|
||||
# mistune
|
||||
import mistune
|
||||
|
|
@ -16,10 +17,14 @@ from mistune.plugins.def_list import def_list
|
|||
from mistune.plugins.abbr import abbr
|
||||
from mistune.plugins.spoiler import spoiler
|
||||
|
||||
# local
|
||||
from .plugins.merge_lists import merge_ordered_lists
|
||||
from .renderers.bbcode import BBCodeRenderer
|
||||
from .html2bbcode import process_html
|
||||
if RNS.vendor.platformutils.is_android():
|
||||
from .plugins.merge_lists import merge_ordered_lists
|
||||
from .renderers.bbcode import BBCodeRenderer
|
||||
from .html2bbcode import process_html
|
||||
else:
|
||||
from sbapp.md2bbcode.plugins.merge_lists import merge_ordered_lists
|
||||
from sbapp.md2bbcode.renderers.bbcode import BBCodeRenderer
|
||||
from sbapp.md2bbcode.html2bbcode import process_html
|
||||
|
||||
def convert_markdown_to_bbcode(markdown_text, domain):
|
||||
# Create a Markdown parser instance using the custom BBCode renderer
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from mistune.plugins.abbr import abbr
|
|||
from mistune.plugins.spoiler import spoiler
|
||||
|
||||
#local
|
||||
from md2bbcode.plugins.merge_lists import merge_ordered_lists
|
||||
from sbapp.md2bbcode.plugins.merge_lists import merge_ordered_lists
|
||||
|
||||
def convert_markdown_to_ast(input_filepath, output_filepath):
|
||||
# Initialize Markdown parser with no renderer to produce an AST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue