-
Notifications
You must be signed in to change notification settings - Fork 138
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
Syntax highlighting #691
Syntax highlighting #691
Conversation
We aren't any good at the css or the styling. Not to mention that it needs some more work on both the css classes generated accepted, and what needs to be highlighted. Sublime/textmate syntaxes are rather intricate. |
a general comment, if you want GitHub to properly credit you, you may wanna add the email from the commits to your github email addresses. |
5e8bf39
to
0a69d5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine overall, just a few remarks:
- The
.punctuation
spans should probably be of the default text color (black/white depending on the theme) - The languages names are not obvious to guess, I had to print the list to know what names to use. A good improvement could be to make them lowercase, and replace non-alphabetic characters with
-
(for instance,HTML Erlang
would becomehtml-erlang
). It would require you to write your own equivalent offind_syntax_by_name
tho.
Here is the list of languages in case someone wants to see it:
"Plain Text",
"ASP",
"HTML (ASP)",
"ActionScript",
"AppleScript",
"Batch File",
"NAnt Build File",
"C#",
"C++",
"C",
"CSS",
"Clojure",
"D",
"Diff",
"Erlang",
"HTML (Erlang)",
"Go",
"Graphviz (DOT)",
"Groovy",
"HTML",
"Haskell",
"Literate Haskell",
"Java Server Page (JSP)",
"Java",
"JavaDoc",
"Java Properties",
"JSON",
"JavaScript",
"Regular Expressions (Javascript)",
"BibTeX",
"LaTeX Log",
"LaTeX",
"TeX",
"Lisp",
"Lua",
"Make Output",
"Makefile",
"Markdown",
"MultiMarkdown",
"MATLAB",
"OCaml",
"OCamllex",
"OCamlyacc",
"camlp4",
"Objective-C++",
"Objective-C",
"PHP Source",
"PHP",
"Pascal",
"Perl",
"Python",
"Regular Expressions (Python)",
"R Console",
"R",
"Rd (R Documentation)",
"HTML (Rails)",
"JavaScript (Rails)",
"Ruby Haml",
"Ruby on Rails",
"SQL (Rails)",
"Regular Expression",
"reStructuredText",
"Ruby",
"Cargo Build Results",
"Rust",
"SQL",
"Scala",
"Bourne Again Shell (bash)",
"Shell-Unix-Generic",
"commands-builtin-shell-bash",
"HTML (Tcl)",
"Tcl",
"Textile",
"XML",
"YAML"
Otherwise, it works fine as I said. Thank you!
Codecov Report
@@ Coverage Diff @@
## master #691 +/- ##
=========================================
- Coverage 39.32% 39.3% -0.03%
=========================================
Files 72 72
Lines 9497 9534 +37
Branches 2265 2275 +10
=========================================
+ Hits 3735 3747 +12
- Misses 4697 4714 +17
- Partials 1065 1073 +8 |
(commit cargo.lock)
38be804
to
91a1496
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, thank you!
\o/ |
No description provided.