-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 TypoScript #2505
Conversation
as i changed my github username, i've updated arduino component too
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.
Will be fixed! ;)
Will check this too.
I take a short look at it, but to be honest, i already spend way to much time on this language creation. 😉 |
Two further questions:
|
Of course!
Here is how the Java language definition does it. Please note that the IIFE is necessary to prevent namespace pollution. |
Thank you for your reply. I'm now completely finished with my work, but the default tests fails, because of one regex group. But i have no idea how to fix this. I need a bit of help here. The Problem is my comment matching. General a comment always starts with My regex: {
// double-slash comments - ignored when backslashes or colon is found in front
// also ignored whenever directly after an equal-sign, because it would probably be an url without protocol
pattern: /(^|(?<!\\|:|=\s*))\/\/.*/,
lookbehind: true,
greedy: true
}, Here is a working example of it. Everything is fine, but i would not pass the test: Would be nice if someone has a hint how to do this. Thanks! |
The problem in But the problem with Prism lookbehind groups is that we can't easily negate them. This is not trivial, so here's your pattern with the ES2018 lookbehind: However, your tests still don't pass because with the second comment here not being highlighted:
Why is the second comment not highlighted? The problem is that after the first comment, the next character is a How do we fix that?
Final pattern: |
Thank you @RunDevelopment ! I've tested your pattern and it works perfectly! Such things are way above my regex-knowledge. ;) So, a second before your comment, I've pushed my changes. I've completely redone my language definition and managed to removed the whole tag list, so it is now more a syntax based highlighting. I'm pretty pleased with the outcome. The highlighting is much better then in my first submission. Overall, i have noting left to do. Everything is covered so far. I think i have managed to get all your things in the review covered. I've added some tests too and hope that everything is ok now. |
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.
Looks good!
I still have some minor nits but it's basically ready.
You do need to resolve the merge conflicts. All of the conflicts are with generated files, so after git merge
, running npm run build
should resolve all of them.
# Conflicts: # components.js # plugins/autoloader/prism-autoloader.min.js # plugins/show-language/prism-show-language.min.js
I think I've resolved everything so far. Hopefully we're fine now. 😉 |
@dkern The last remaining issue is the |
Done. |
Thank you for contributing @dkern! |
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.
Excellent job
Added support for TypoScript/TSConfig highlighting.