Skip to content

Add an option to skip generating the explanation text#52

Merged
octref merged 2 commits intoshikijs:masterfrom
Gerrit0:perf/explanation
Aug 20, 2020
Merged

Add an option to skip generating the explanation text#52
octref merged 2 commits intoshikijs:masterfrom
Gerrit0:perf/explanation

Conversation

@Gerrit0
Copy link
Contributor

@Gerrit0 Gerrit0 commented Aug 3, 2020

As alluded to in #51, there are still lots of string copies that aren't necessarily required when tokenizing due to including the explanation for each token's color. This adds an option which can be used to disable the explanation generation if not required.

Since this builds on the changes in #51, it is also included in this PR.

Copy link
Collaborator

@octref octref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! I didn't bother to explain the API earlier since it's simple and mostly documented on the website, but now I think it's better to add some explanations.

@octref octref merged commit f82b927 into shikijs:master Aug 20, 2020
octref added a commit that referenced this pull request Aug 20, 2020
@Gerrit0 Gerrit0 deleted the perf/explanation branch September 19, 2021 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants