mirror of
https://github.com/Xevion/find-syntax.git
synced 2025-12-05 23:14:57 -06:00
Analysis notes
This commit is contained in:
@@ -6,6 +6,15 @@ An experiment to try and find the ideal syntax highlighter for an arbitrary snip
|
|||||||
- Determine the complexity and level of color in the generated HTML.
|
- Determine the complexity and level of color in the generated HTML.
|
||||||
- Report and display the results, showing the "best" syntax highlighter for the snippet.
|
- Report and display the results, showing the "best" syntax highlighter for the snippet.
|
||||||
|
|
||||||
|
## Analysis
|
||||||
|
|
||||||
|
- Colorization can be counting the number of non-whitespace characters inside an element with a classname starting with `pl-` as a percentage of all non-whitespace characters.
|
||||||
|
- Some class identifiers represent white colors, and should be manually blacklisted from being counted.
|
||||||
|
- The deepest/closest classname should be used to determine the color.
|
||||||
|
- CSS analysis may be required if multiple classnames are used to determine the color. This shouldn't happen though.
|
||||||
|
- Complexity can be determined by analyzing the average coverage for each color within the colorized text.
|
||||||
|
- [Distribution calculation](https://gist.github.com/Xevion/1b5c971e88ac51521c133cc7e04ecdff)
|
||||||
|
|
||||||
## Goals
|
## Goals
|
||||||
|
|
||||||
- Memory caching of API results to prevent unnecessary requests.
|
- Memory caching of API results to prevent unnecessary requests.
|
||||||
|
|||||||
Reference in New Issue
Block a user