New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for TOML frontmatter syntax highlighting in markdown files #10

Closed
marcobeltempo opened this Issue Feb 13, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@marcobeltempo
Contributor

marcobeltempo commented Feb 13, 2018

Refrences: VSCode Issue#41650

I've added support for TOML frontmatter in Markdown files. A feature originally requested in vscode.

Steps to reproduce:

  1. Create a .md file
  2. add to the top line
+++

+++
  1. Insert TOML syntax
title = "TOML Example"

@bungcip I would like your feedback on this feature.
You can test it out here https://github.com/marcobeltempo/vscode-fenced-toml

image

@bungcip

This comment has been minimized.

Owner

bungcip commented Feb 14, 2018

Hi @marcobeltempo, I already test your https://github.com/marcobeltempo/vscode-fenced-toml.
I think this is a good feature to add. In order to integrate this feature, I think you need to remove #illegal pattern in TOML.tmLanguage because those pattern will eat +++ token.

See my pull request for your example: marcobeltempo/vscode-fenced-toml#1.

If you want to create PR to add this feature please clone it from 0.3 branch (https://github.com/bungcip/better-toml/tree/0.3). Current master branch is broken because i am still not finishing my toml parser library :(

Just remove #illegal in TOML.tmLanguage .YAML, then convert it to TOML.tmLanguage using tmLanguage extension (https://github.com/Togusa09/vscode-tmlanguage)

image

I happy to waiting your PR :)

@marcobeltempo

This comment has been minimized.

Contributor

marcobeltempo commented Feb 14, 2018

@bungcip Thank you for taking the time to review it and submit a pr!
I will be submitting a pull request to 0.3 branch shortly

@marcobeltempo

This comment has been minimized.

Contributor

marcobeltempo commented Feb 14, 2018

@bungcip do you suggest keeping the code block rule separate in a codeblock.tmLanguage file or integrate it within the existing TOML.tmLanguage file?

@bungcip

This comment has been minimized.

Owner

bungcip commented Feb 15, 2018

I think its better to separate it.

bungcip added a commit that referenced this issue Feb 18, 2018

Merge pull request #11 from marcobeltempo/v0.3_frontmatter_codeblock
Fixes #10 -  Added support for TOML Front Matter syntax highlighting in Markdown files
@bungcip

This comment has been minimized.

Owner

bungcip commented Feb 18, 2018

new version of better-toml released with this feature.

@bungcip bungcip closed this Feb 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment