GithubHelp home page GithubHelp logo

mjbvz / vscode-markdown-checkboxes Goto Github PK

View Code? Open in Web Editor NEW
45.0 6.0 5.0 326 KB

VS Code extension that adds support for checkbox syntax to the built-in markdown preview

Home Page: https://marketplace.visualstudio.com/items?itemName=bierner.markdown-checkbox

License: MIT License

JavaScript 69.54% CSS 4.71% TypeScript 25.74%

vscode-markdown-checkboxes's Introduction

Adds checkbox / task list support to VS Code's built-in markdown preview and in notebooks:

Features

  • Adds support for Github's - [ ] and - [x] check box syntax to VS Code's built-in markdown preview.
  • Adds - [ ] and - [x] checkbox rendering Markdown cells in notebooks.

vscode-markdown-checkboxes's People

Contributors

mjbvz avatar cameronevans avatar peterwone avatar

Stargazers

Ron Shaker avatar  avatar  avatar Germán Freixinós avatar Andrii Oriekhov avatar George Fotopoulos avatar  avatar Jagrut avatar  avatar Allan Oricil avatar `{3rd: "Beedell", 1st: "Roke"}`{.JSON5} avatar  avatar Matías Juarez avatar eric0210 avatar Jonas Lomholdt avatar Zane Helton avatar  avatar Cody Gagnon avatar Diego Umbelino avatar Brian K avatar Max Smirnov avatar  avatar James Knight avatar Frédéric Harper avatar shioko avatar  avatar Beau Harrison avatar Alexander Dischberg avatar Alexey Dubrov avatar Vũ Văn Dũng avatar Kevin Chau avatar Andrey avatar Aaron Ross avatar APixel Visuals avatar Isaac Azuelos avatar Thomas Prochazka avatar Patrik Csak avatar 普鲁文 avatar Paweł Lesiecki avatar Liping Wang avatar Jeremy Kohn avatar Richard Davenport avatar Steven avatar Cody Logan avatar Chris avatar

Watchers

James Cloos avatar  avatar Germán Freixinós avatar  avatar  avatar  avatar

vscode-markdown-checkboxes's Issues

Any chance of Notebook support?

Any chance this could be added to the markdown parser for VS Code notebooks?
I'd love to have checklist support in those. Even more so if the could be made clickable for easy toggling.
I haven't had time to look into it, so I presently have no clue how difficult this would be to implement.

Checkboxes misaligned

Running VS Code on Ubuntu 16.04. The check boxes and list items are not aligned well.

screenshot from 2018-01-10 16-07-56

Nested lists

Nesteds lists doesn't render correctly :

code_2018-02-01_14-57-03

Instead of :

firefox_2018-02-01_14-51-26

Does this extension have settings?

"contributes": {
"markdown.markdownItPlugins": true,
"markdown.previewStyles": [
"checkboxes.css"
],
"configuration": {
"title": "Markdown Checkboxes Options",
"properties": {
"vscode-markdown-checkboxes.enable": {
"type": "boolean",
"description": "Enable checkboxes in markdown preview.",
"default": true
},
"vscode-markdown-checkboxes.label" : {
"type": "boolean",
"markdownDescription": "Wrap the rendered list items in a `<label>` element.",
"default": false
},
"vscode-markdown-checkboxes.labelAfter" : {
"type": "boolean",
"markdownDescription": "Adds the label after the checkbox. Only applies when `#vscode-markdown-checkboxes.label#` is set to `true`.",
"default": false
}
}
}
},

They are not present in Settings UI or settings.json.

task lists with wrapped lines have no hanging indent

With a task list, where a task is very long, and is wrapped in the preview... the wrap has no hanging indent and is instead restarted at the beginning of the line.

Repo

- [ ] test 1
- [ ] test 2 fs sfddsafsdsfg afg afsgfdsg asfgsa afdgafdsgsfdg dfsgdsfg
  sfdg sdfgsdffdsg fda sdf adsfasfas fdsafsadf sadf sadfsadf asdf asf
  saf sadfasdf asdfsadfas fsdafasdf sadfsadf sadfsadf asdfsadf asdf
- [ ] test 3

Errant Result

image

Expected

Here is the GitHub render. Notice the hanging indent on the second task

  • test 1
  • test 2 fs sfddsafsdsfg afg afsgfdsg asfgsa afdgafdsgsfdg dfsgdsfg
    sfdg sdfgsdffdsg fda sdf adsfasfas fdsafsadf sadf sadfsadf asdf asf
    saf sadfasdf asdfsadfas fsdafasdf sadfsadf sadfsadf asdfsadf asdf
  • test 3

Notes

I found over https://gist.github.com/BigstickCarpet/5d31c053d0b1d52389eb2723f7550907 three css styles which would better match GitHub if I used them with the custom user setting "markdown.styles". I needed to tweak them a little. Here's what is working for me.

body .task-list-item {
    list-style-type: none;
    padding-left: 42px;
    padding-right: 15px;
    margin-left: -15px;
    margin-right: -15px;
}

body .task-list-item+.task-list-item {
    margin-top: 0;
}

body .task-list-item input {
    list-style-type: none;
    text-align: start;
    padding: 0;
    margin: 0 2.8px 3.5px -22.4px;
}

Wrong Alignment

The following snippet will be rendered with wrong alignment:

- Item 1
- [ ] todo
- Item 2

1. Item 1
2. [x] todo
3. Item 2

With this extension enabled:

image

With this extension disabled:

image

Github:

  • Item 1
  • todo
  • Item 2
  1. Item 1
  2. todo
  3. Item 2

Custom coloring of markdown text

Hi, this is more a question then a concrete request but have you every considered add color highlighting for the [x] piece? So that [ and ] have a different color then the x.

I'm just wondering if it is possible without override all other markdown styles. I've been doing a bit of research and I was able to hook a custom tmLanguage.json file in an extension that did similar coloring.
However I lost all other markdown coloring, so I'm trying to find out if it possible.

Maybe you have try this yourself, it is a long shot.

Option for Checked-box to be higher contrast or different color?

The current default box when checked is "grey on grey" and incredibly hard to see at a distance. Is there any way to make the box turn Green when checked? Or even just use a higher contrast "black on white" color scheme? The current look is basically unreadable, thus effectively useless at visually communicating what its supposed to communicate.

Imgur

The specifics of the color/design aren't important here. There just needs to be something with a little more contrast.

Where exactly is this extension pulling its checkbox graphics from? Is it using something from VS Code's currently installed theme, or are the checkbox graphics custom? Or are the boxes generated with CSS or something?

Suggestion: Keyboard shortcut

Nice little extension! It works well with the other markdown extensions and a material theme.

Would you consider adding a keyboard shortcut to toggle or create a checkbox?

If a shortcut were assigned like maybe Alt-S, then it would create the checkbox '[ ]' if it did not exist. If '[ ]' or '[x]' does exist, then it would alternate to the other one.

Thanks!

Add more contrast to colors of rendered boxes

I use checkboxes in MArkdown cells of Jupyter Notebooks. Currently, in the rendered markdown mode both completed and incompleted boxes look almost identical and while scrolling fast it is almost impossible to distinguish between both:
image

Is there a way to change colors, e.g., make completed boxes green? If not, could this feature be added as, e.g., a VS Code setting?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.