Skip to content
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

In product release notes lacks syntax highlighting #13049

Closed
gregvanl opened this issue Sep 29, 2016 · 7 comments
Closed

In product release notes lacks syntax highlighting #13049

gregvanl opened this issue Sep 29, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug release-notes Release notes issues verified Verification succeeded
Milestone

Comments

@gregvanl
Copy link

  • VSCode Version:1.6.0 insiders
  • OS Version: Windows 10

fencedcodeblock

@joaomoreno joaomoreno added this to the September 2016 milestone Sep 30, 2016
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Sep 30, 2016
joaomoreno added a commit that referenced this issue Sep 30, 2016
@joaomoreno
Copy link
Member

Moving to October because the colorisation is still not there. But at least the surrounding box and formatting is in.

@joaomoreno joaomoreno changed the title In product release notes fenced code blocks missing surrounding box and syntax highlighting. In product release notes lacks syntax highlighting Sep 30, 2016
@joaomoreno joaomoreno modified the milestones: Backlog, October 2016 Oct 3, 2016
@joaomoreno joaomoreno added the release-notes Release notes issues label Apr 26, 2017
@joaomoreno
Copy link
Member

To keep the number of issues in our inbox on a manageable level, we're closing issues that have been on the backlog for a long time but haven't gained traction: We look at the number of votes the issue has received and the number of duplicates issues filed.

Thanks for your understanding. Happy coding!

@joaomoreno
Copy link
Member

@alexandrudima This kinda got lost in the past. I call tokenizeToString which tokenizes perfectly. But how can I get a hold of the generated CSS, I need to add it to the webview.

@mjbvz Markdown seems to use HLJS for this... why not tokenizeToString?

@joaomoreno
Copy link
Member

@alexandrudima Just found this, should I do something similar to it?

@mjbvz
Copy link
Contributor

mjbvz commented Nov 27, 2017

@joaomoreno The markdown extension uses hljs because it does not have access to the editor's tokenization APIs

@alexdima
Copy link
Member

@joaomoreno This is the method you want to call. It will generate a few CSS rules like:

.mtk1 { color: #333333; }
.mtk2 { color: #f5f5f5; }
.mtk3 { color: #aaaaaa; }
.mtk4 { color: #448c27; }
.mtk5 { color: #ab6526; }
.mtk6 { color: #777777; }
.mtk7 { color: #7a3e9d; }
.mtk8 { color: #660000; }
.mtk9 { color: #aa3731; }
.mtk10 { color: #4b83cd; }
.mtk11 { color: #91b3e0; }
.mtk12 { color: rgba(150, 0, 0, 0.08); }
.mtk13 { color: #000000; }
.mtk14 { color: #ffffdd; }
.mtk15 { color: #ffdddd; }
.mtk16 { color: #ddffdd; }
.mtk17 { color: #434343; }
.mtk18 { color: #ddddff; }
.mtk19 { color: #333333; }
.mtk20 { color: #f5f5f5; }
.mtk21 { color: #eaebe6; }
.mtk22 { color: #800080; }
.mtk23 { color: #cd3131; }
.mtk24 { color: #316bcd; }
.mtk25 { color: #cd9731; }
.mtki { font-style: italic; }
.mtkb { font-weight: bold; }
.mtku { text-decoration: underline; }

You can get the color map from TokenizationRegistry.getColorMap().

@joaomoreno
Copy link
Member

@alexandrudima You rule!

image

cc @seanmcbreen

@joaomoreno joaomoreno modified the milestones: Backlog, November 2017 Dec 4, 2017
@gregvanl gregvanl added the verified Verification succeeded label Dec 6, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug release-notes Release notes issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants