Closed luispuerto closed 4 years ago
PS/ Sane List is in the extension list configuration file.
"markdown_extensions": [
// Python Markdown Extra with SuperFences.
// You can't include "extra" and "superfences"
// as "fenced_code" can not be included with "superfences",
// so we include the pieces separately.
"markdown.extensions.footnotes",
"markdown.extensions.attr_list",
"markdown.extensions.def_list",
"markdown.extensions.tables",
"markdown.extensions.abbr",
"pymdownx.betterem",
{
"markdown.extensions.codehilite": {
"guess_lang": false
}
},
// Extra's Markdown parsing in raw HTML cannot be
// included by itself, but "pymdownx" exposes it so we can.
"pymdownx.extrarawhtml",
// More default Python Markdown extensions
{
"markdown.extensions.toc":
{
"permalink": "\ue157"
}
},
"markdown.extensions.meta",
"markdown.extensions.sane_lists",
"markdown.extensions.smarty",
"markdown.extensions.wikilinks",
"markdown.extensions.admonition",
I'm not seeing this issue. When I use sane_lists
, the second list (after the paragraph) starts with 4
.
Are you sure you are running the correct parser? Make sure you are using the markdown
parser and not the github
parser, or some other. Also report any errors found in the console if you have any.
When I use
sane_lists
Besides of having it on "markdown_extensions": [
on settings, do I need to have it enable somewhere?
Are you sure you are running the correct parser? Make sure you are using the markdown parser and not the github parser, or some other. Also report any errors found in the console if you have any.
Funnily... with GitHub parser the list correctly work and starts on 4, but not with the markdown parser.
This is the only thing warning in the console:
MarkdownPreview: Warning: The list format for JS is deprecated, please use the dictionary format.
List support will be removed in the future.
PS/ these are my settings https://gist.github.com/luispuerto/4f99edc9d891c3094ff3b248de0a9ab4 but I've tried removing all the settings —thus using the default ones— and the result was the same.
Apparently I am using an unreleased version of Python Markdown locally. When I downgraded to the current official release, it appears I am now getting the same behavior you are. I need to look into this more as I am currently confused why this isn't working.
It seems the issue is definitely specific to the current release of Python Markdown as when I jump back up to the the current unreleased tip of the dependency, the issue is no longer present. I'll probably sync the repo up to the current latest, along with pymdown-extensions, and release those dependencies after ensuring everything is working properly.
It will be easier to to probably just sync than figure out what went awry with the last release. I've been meaning to get the latest Python Markdown out anyways, but due to the extensive changes, I have to sync the pymdown-extensions release with it as there will be compatibility issues if I don't.
Okay, I understand what the issue is now. It turned out that lazy_ol
used to be a global parameter that was fed into the Markdown
class. lazy_ol
was enabled by default, meaning that it would simply ignore the first number.
In the 3.0 series of Markdown (we are currently using 2.6.11) it was changed to have sane_lists
control this as well as its other functionality. That is why we have this difference. These global parameters are not exposed in Markdown Preview, and since Markdown 3.0+ will do away with them, it doesn't make sense to add them.
Worst case scenario, I can backport this fix if pushing out the full 3.0+ takes me too long.
great to hear! 🙂
So I guess you are going to fix it soon, right? or do you need to wait till the release of the new python Markdown?
Current behavior is not a bug. So I'm viewing this more as a feature request. As for when it will get done, it will hopefully be soon, it all depends on my schedule and motivation.
Knowing that 2.6.11 is behaving as intended takes the urgency off though as I am no longer fixing a botched merge, but simply bringing new functionality provided by the latest version. I don't have to wait for a new release, I just need to carve out the time and motivation to get it done.
I don't know if it's really a bug or not... but the reality is we have in the "markdown_extensions":
the "markdown.extensions.sane_lists"
and it isn't rendering the list as expected when that extension is in use.
Anyhow... it's true that the problem isn't dire.
and it isn't rendering the list as expected when that extension is in use.
This is not a true statement. It is not rendering as expected when reading the current 3.0 documentation, but we are not using Python Markdown 3.0, we are using 2.6.11.
If you read 2.6.11 documentation, you'll find it is working exactly as described: https://github.com/Python-Markdown/markdown/blob/2.6.11/docs/extensions/sane_lists.md.
I hoping to upgrade the Python Markdown dependency very soon. When this is done, this should be fixed.
I've upgraded the Python Markdown library and Pymdown Extensions library. This should be fixed once systems upgrade the dependencies. If it doesn't update (it may take an hour or two to actually trigger an update) you can try running Satisfy dependencies
from the control panel, and if everything installs okay in the console, restart Sublime.
Yeah! Now works perfectly. Thanks a lot!
I think that python markdown sane list extension isn't working properly since the lists aren't rendering with the correct numbers:
renders:
Perhaps am I missing something?