86 lines
2.8 KiB
Markdown
86 lines
2.8 KiB
Markdown
# MarkdownLivePreview
|
|
|
|
## Acknowledgments
|
|
|
|
This project is a fork of [MarkdownLivePreview](https://github.com/math2001/MarkdownLivePreview) by **math2001**. I'm grateful for the original implementation, which provided a solid foundation for live Markdown preview in Sublime Text.
|
|
|
|
Many thanks to math2001 for the original code—this fork wouldn't have been possible without their work.
|
|
|
|
## Changes contained in this Fork
|
|
|
|
In this fork ([christian.morpurgo/MarkdownLivePreview](https://git.0x42.cloud/christian.morpurgo/MarkdownLivePreview)), I've made the following enhancements:
|
|
|
|
- **Bundled `bs4` and `soupsieve`**
|
|
Repackaged both libraries as standalone modules by rewriting their imports, resolving errors when Sublime Text 4 attempted to install these old versions as external dependencies.
|
|
|
|
- **`font_scale` option**
|
|
Added a new `font_scale: number` setting to allow users to increase or decrease the preview text size directly from their Sublime Text settings.
|
|
|
|
- **In-window preview**
|
|
Changed the preview behavior so that starting a preview reuses the current window instead of opening a new one.
|
|
|
|
|
|
A simple plugin to preview your markdown as you type right in Sublime Text.
|
|
No dependencies!
|
|
|
|
## How to install
|
|
|
|
It's available on package control!
|
|
|
|
## Setting a keybinding
|
|
|
|
The open the preview, you can search up in the command palette
|
|
(<kbd>ctrl+shift+p</kbd>) `MarkdownLivePreview: Open Preview`. But if you
|
|
prefer to have a shortcut, add this to your keybindings file:
|
|
|
|
```json
|
|
{
|
|
"keys": ["alt+m"],
|
|
"command": "open_markdown_preview"
|
|
}
|
|
```
|
|
|
|
## How to contribute
|
|
|
|
If you know what feature you want to implement, or what bug you wanna fix, then
|
|
go ahead and hack! Maybe raise an issue before hand so that we can talk about
|
|
it if it's a big feature.
|
|
|
|
But if you wanna contribute just to say thanks, and don't really know what you
|
|
could be working on, then there are a bunch of `FIXME`s all over this package.
|
|
Just pick one and fix it :-)
|
|
|
|
```
|
|
$ git clone https://git.0x42.cloud/christian.morpurgo/MarkdownLivePreview
|
|
$ cd MarkdownLivePreview
|
|
$ grep -R FIXME
|
|
```
|
|
|
|
### Hack it!
|
|
|
|
1. Fork this repo
|
|
2. Make your own branch (the name of the branch should be the feature you are
|
|
implementing eg. `improve-tables`, `fix-crash-on-multiple-preview`
|
|
3. All your code should be formated by black.
|
|
4. Send a PR!
|
|
|
|
### Known limitations
|
|
|
|
#### Numbered lists are rendered as unordered lists
|
|
|
|
```md
|
|
1. first
|
|
2. second
|
|
3. third
|
|
```
|
|
|
|
will be previewed the exact same way as
|
|
|
|
```md
|
|
- first
|
|
- second
|
|
- third
|
|
```
|
|
|
|
The issue comes from [Sublime Text's minihtml](https://www.sublimetext.com/docs/3/minihtml.html) which [doesn't support ordered lists](https://github.com/sublimehq/sublime_text/issues/1767). If you think feel like implementing a workaround, feel free to contribute, but it's not something I'm planning on doing. It isn't a critical feature, and support should come with time...
|