Comments (11)
Hi, I can confirm apparently python-markdown doesn't handle indented code blocks,
Thank you for reporting the issue.
from python-markdown-editor.
Interesting, maybe there's a chance to add support for python-markdown2?
from python-markdown-editor.
Tested with python-markdown2, same issue.
from python-markdown-editor.
An option would be to add an extension at markdown initialization the same way I did for strikethrough.
A project exists which contains almost all GFM extensions to python markdown including strikethrough : https://github.com/Zopieux/py-gfm
Unfortunately it doesn't seem to support indented codeblocks...
At least this project could improve support for GFM, if it can be confirmed it doesn't support indented codeblocks, making a fork could also be an option.
from python-markdown-editor.
This project might be helpful. I've managed to make it working using superfences extension with modification from this PR I've just created by executing this:
markdown_edit -x pymdownx.superfences test.md
Should pymdownx.superfences
be included by default introducing yet another dependency or should the above-mentioned PR be merged in order to make overriding work correctly?
from python-markdown-editor.
If pymdownx.superfences
extension makes rendering closer to GFM, I would recommend you include it directly into defaults extensions by updating MARKDOWN_EXT
constant
from python-markdown-editor.
@ncornette it should be pretty close. The closest one would probably be pymdownx.github. But the only concern I have is yet another dependency just for ability to use GFM-like code blocks, while with optional -x
argument there's more freedom for an end user. But it's not critical, I agree.
By the way, unfortunately I couldn't make the tasklist extension (which is included in pymdownx.github
) work properly -- it concatenates list and check chars. Do you have any idea on what would cause that?
from python-markdown-editor.
Oh, I've figured out it was just missing task-list
class. With this patch it works as expected:
--- markdown_editor/css/markdown.css.orig 2016-06-06 18:24:21.000000000 -0400
+++ markdown_editor/css/markdown.css 2017-01-17 20:49:16.872820211 -0500
@@ -113,7 +113,7 @@
padding-left:30px
}
-.markdown-body ul.no-list,.markdown-body ol.no-list{
+.markdown-body ul.no-list,.markdown-body ul.task-list,.markdown-body ol.no-list,.markdown-body ol.task-list{
list-style-type:none;
padding:0
}
So what do you think? Along with this patch and additional entry of pymdownx.github
in MARKDOWN_EXT
should we introduce yet another dependency for better GFM support?
It also worth mentioning that pymdownx.github
already includes tilde extension, so maybe strikethrough would become redundant in that case.
from python-markdown-editor.
Hey Vaygr !
It seems you found solutions to improve GFM rendering, don't hesitate to update your PR with your improvements, I will check the result before merging!
Let me know if you agree to proceed this way, I will eventually update the version and publish a new release on PIP.
Thank you for your work !
from python-markdown-editor.
@ncornette absolutely!
I've pushed respective commits to the above-mentioned PR for your review.
from python-markdown-editor.
Verified in recently released 1.0.3. Works like a charm. Thanks!
p.s. therefore closing this.
from python-markdown-editor.
Related Issues (20)
- Missing Dependenies HOT 1
- Word wrap
- Was the security ever concerned?
- Changes in pymdown-extensions break command-line invocation HOT 5
- Broken dependencies HOT 3
- -- HOT 1
- dont support gramar correction beacause use pre in the way of input
- unexpected keyword argument 'term_edit' HOT 2
- I can't start the markdown-editor
- ModuleNotFoundError: No module named 'markdown.extensions.pymdownx' HOT 4
- Multiple file editing in same server session
- Issue with (current version of ) pymdown-extensions 8.x HOT 1
- don't work , just the web and only on folder install HOT 1
- table not rendering as expected HOT 2
- No save button in firefox HOT 2
- localhost port HOT 2
- Using build-in and custom extensions? HOT 1
- after saving in vim-mode vim-mode is disabled HOT 1
- Save and Preview Error in Chrome HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-markdown-editor.