Questions tagged [python-markdown]

The Python Markdown is an extension for Jupyter Notebook that allows displaying output produced by the current kernel in markdown cells.

26 questions
3
votes
1 answer

Replace Markdown heading tags with custom in Python Markdown

We want to replace the default h tags, introduced by markdown using #, with a custom HTML Tag. For Parsing Markdown to HTML we use the Python Library Markdown. We have tried to register an extension that uses a H1 regex. This extension uses the…
2
votes
1 answer

MyST-Parser: Auto linking / linkifying references to bug tracker issues

I use sphinx w/ MyST-Parser for markdown, and I want GitHub or GitLab-style auto linking (linkfying) for references. Is there a way to have MyST render the reference: #346 In docutils-speak, this is a Text node (example) And behave as if it…
tony
  • 870
  • 7
  • 16
2
votes
1 answer

How can I make mkdocs support Markdown documentations in multiple locations?

MkDocs is a great tool for documentation based on Markdown language. However, currently it only supports documentations in one specific location as this document shows (see mkdocs configuration): docs_dir The directory containing the documentation…
feelfree
  • 11,175
  • 20
  • 96
  • 167
2
votes
2 answers

How to Add "lang" Attribute to a
 Tag in python-markdown?

I'm using django-pygmentes in order to highlight my code-blocks. I'm writing the contents with markdown and convert it to HTML in the view part. Everything is ok. Now, I want to implement the highlighting side. The Pygmentes package needs something…
Sadra
  • 167
  • 1
  • 9
2
votes
1 answer

Code block in a numbered list messes up numbering python-markdown/mkdocs

I am creating a list of instructions for one of my projects in mkdocs, which I believe uses python-markdown as its markdown engine. But when I try to put a fenced code block in between numbers in the list it renders the numbering wrong. An example…
yo76yo
  • 138
  • 7
2
votes
1 answer

Enable line numbers for specific markdown code listings designated with backticks

I am using MkDocs with the codehilite markdown extension I would like to enable code snippet line numbers only for specific snippets. If I set markdown_extensions: - codehilite: linenums: true in my mkdocs.yml, this will enable line…
Thomas Kainrad
  • 2,542
  • 21
  • 26
2
votes
1 answer

Python Markdown Code not Compiling in Output

In the Jupyter Notebook I am using the Python-Markdown library to compile code in the Jupyter Notebook markdown blocks. The Python code chunks in the markdown block, that is the code within the curly brackets {{}}, compiles and works fine in the…
Greg
  • 138
  • 1
  • 1
  • 6
2
votes
1 answer

How to create options for Python markdown custom extension?

I'm trying to add an option to my custom markdown extension in python3. Unfortuantely I'm getting the following error: File "pymodules/docmarkdown.py", line 232, in get_leaflang_markdown MyFencedCodeExtension(deflang = "leaf"), File…
edA-qa mort-ora-y
  • 30,295
  • 39
  • 137
  • 267
1
vote
0 answers

Markdown does not render URL after PreProcessors

I am using Markdown Preprocessors to convert this specific tag {{% notice success %}}**text**{{% /notice %}} to this HTML tag:

**text**\ But inside my "text", I have some URLs that are not resolved by the Markdown…

1
vote
1 answer

Conversion from Markdown to HTML in Django project

I'm on a project which include use of Python, Django, HTML and Markdown. I have to develop a site similar to wikipedia, in fact the project is called encyclopedia. My goal is to make visiting / wiki / TITLE, where TITLE is the title of an…
Andrea
  • 61
  • 6
1
vote
0 answers

Creating a Python HTML code snippet with pygments/python-markdown/django-markdownx

What is the correct way of creating a HTML code snippet with pygments / python-markdown / django-markdownx? Basically, I am trying to make it look like the code blocks in the official Python documentation:…
PythonSherpa
  • 2,560
  • 3
  • 19
  • 40
1
vote
3 answers

How can I write comments in the metadata section of a Pelican markdown post?

In Pelican, is it possible to add a comment in the metadata section of a markdown file? Suppose I have a post that looks like this: Title: Hello World! Tags: greetings Date: 2020-01-01 Lorem ipsum sit dolor amet... Is it possible to add comments…
Flux
  • 9,805
  • 5
  • 46
  • 92
1
vote
1 answer

Pyinstaller and Python-Markdown - ImportError: no module named 'extra'

I'm running into an issue trying to get python-markdown to work in pyinstaller. I have this code to demonstrate the issue in file called test.py: import markdown testMarkdown = "blahdy blah…
madgrizzle
  • 37
  • 5
1
vote
1 answer

How do I interactively update a markdown cell in jupyter notebook by an IPython widget?

I am using Jupyter notebook with Python 3 kernel. I have a computation which bases on user input by an IPython widget. The result of the computation needs to be shown in a markdown cell. For this I use the Python Markdown nbextension. The Question…
1
vote
1 answer

Producing well-formed XHTML with Pelican

By default, Pelican produces HTML (not XHTML) from Markdown. For instance, markup ![A bird](images/bird.jpg) will produce with a non-closed tag, breaking XHTML. Is there a way to convince Pelican to produce XHTML? Or must…
bortzmeyer
  • 34,164
  • 12
  • 67
  • 91
1
2