markdown: Error re.error: global flags not at the start of the expression at position ...
CudaText plugin: https://github.com/cudaText-addons/cuda_markdown_preview
is giving error under Python 3.11 and Win10:
Init: cuda_markdown_preview
Traceback (most recent call last):
File "C:\APPLIS\cudatext\py\cuda_markdown_preview\__init__.py", line 12, in <module>
md = markdown.Markdown(extensions=ext)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\APPLIS\cudatext\py\cuda_markdown_preview\markdown\core.py", line 96, in __init__
self.registerExtensions(extensions=kwargs.get('extensions', []),
File "C:\APPLIS\cudatext\py\cuda_markdown_preview\markdown\core.py", line 125, in registerExtensions
ext.extendMarkdown(self)
File "C:\APPLIS\cudatext\py\cuda_markdown_preview\mdx_partial_gfm\__init__.py", line 62, in extendMarkdown
gfm.AutolinkExtension().extendMarkdown(md)
File "C:\APPLIS\cudatext\py\cuda_markdown_preview\gfm\autolink.py", line 75, in extendMarkdown
md.inlinePatterns.register(AutolinkPattern(URL_RE, md), "gfm-autolink", 100)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\APPLIS\cudatext\py\cuda_markdown_preview\markdown\inlinepatterns.py", line 209, in __init__
self.compiled_re = re.compile(r"^(.*?)%s(.*)$" % pattern,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "re\__init__.py", line 227, in compile
File "re\__init__.py", line 294, in _compile
File "re\_compiler.py", line 743, in compile
File "re\_parser.py", line 980, in parse
File "re\_parser.py", line 455, in _parse_sub
File "re\_parser.py", line 841, in _parse
re.error: global flags not at the start of the expression at position 6
ERROR: Exception in CudaText for cuda_markdown_preview.run: error: global flags not at the start of the expression at position 6
What can I do?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (8 by maintainers)
Yeah I saw that. However, we can not be responsible for third party extensions. That is the choice of the developers of the extension. Your choices include not updating to Python 3.11, finding an alternate extension, patching the extension yourself, or building your own replacement extension.