-
Notifications
You must be signed in to change notification settings - Fork 394
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
[WIP] css: highlight subcommands for dvc #713
Conversation
@algomaster99 this is not about |
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.
This is great so far! Fixes a problem we didn't even notice in the ```usage blocks 🙂
But #541 is about dvc
blocks actually, can you also fix that? We should merge this regardless but if you can include that too, even better.
Thanks @algomaster99!
d6b8dfe
to
475e4a5
Compare
Don't merge this yet. I know it is becoming bold because of the
|
475e4a5
to
2610cc0
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.
This seems to be fixed form looking at the review app (e.g. https://dvc-org-pr-713.herokuapp.com/doc/command-reference/pipeline/list). Is this still WIP (work in progress) @algomaster99?
p.s. more info on lexemes: https://en.wikipedia.org/wiki/Lexical_analysis and https://highlightjs.readthedocs.io/en/latest/language-guide.html in our specific case.
2610cc0
to
313e9bd
Compare
@jorgeorpinel So I have written the regex for the third subcommand as But it will match
I prefer the first solution. What do you say? |
This would complicate the docs artificially. Highlighter should be helping, not creating some additional limitations.
It might start highlighting all there keywords somewhere in the middle, not only after |
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.
see my comment above
@shcheklein I think it will match only till second sub-command. This behaviour might exist becuase Changes in regexOutput: |
@algomaster99 I was referring to the current implementation. It's clearly broken since it highlights Could you explain me how does it work? |
@shcheklein yeah sure! I think your confusion might be why |
@algomaster99 I think I understand what you just explained. I don't get why. I thought that |
@shcheklein maybe it keeps traversing down the nest. If we are thinking like that, it is weird that the second sub command is returned as match. |
exactly. I'm thinking like that by reading the docs. That's why I'm asking you. I don't understand why matching an extra space makes it go and math and extra keyword. If we don't understand this, it's not a good idea to merge this - someone will have to support/update it later, or it might break after highlighter update. Could you ask on the highlighter community to clarify this? |
@shcheklein I moved it to StackOverflow: https://stackoverflow.com/questions/58511529/highlight-js-not-respecting-parent-regex-of-a-sub-mode. |
@algomaster99 is there a forum/chat/mail list for the highlighter? may be we can ask there? |
@shcheklein they have a Google Group but it seems very inactive. |
@algomaster99 any progress on this? do you need any help? |
@shcheklein I am just waiting for the stack overflow response but I plan to look into it tomorrow. I didn't have time today. 😅 |
This comment has been minimized.
This comment has been minimized.
@algomaster99 why don't we ask this question/file a bug report to the highlight js Github if it's relevant to this? |
@shcheklein we can try but their GitHub repo was very inactive. |
@algomaster99 can you share the link? how do you see that it's not active? |
@shcheklein okay I just saw again. They have committed a few hours ago. Shall I open the issue there? |
@algomaster99 yes, I think it would reasonable. I think the ticket on SO was too niche to find any help, even bounty does not help it looks like. |
@shcheklein highlightjs/highlight.js#2238 do you think it need more details. I think it explains well. |
@algomaster99 it looks good to me, but I'm biased. I hope they will follow up with some questions if they need more info. |
@algomaster99 really great discussion with Josh in that ticket! Apparently I didn't understand the docs right - relationship between begin/end. I hope you have better idea how to implement it. We can probably add a function that populates sub-rules for pipeline, metrics, etc. The way Josh described. |
@shcheklein I will need to see how I can implement |
@algomaster99 hey, any updates on this? |
@shcheklein no, not yet. Still working on the add function. 😕 |
@algomaster99 I know that you are busy with the conference stuff, but any plans to get this done after that? Or should we reassign and close this PR? |
@shcheklein no need to close it. I will work on it after the conference. :) |
@algomaster99 closing this as a stale one, so that someone else can take it. If you at some decide to get it done, please feel free to push new commits and reopen. |
@shcheklein sure 👍 |
@jorgeorpinel @shcheklein Hey! Saw that you guys finally fixed this problem. Can you tell me which file contains the patch? Apparently a lot of things have changed in the codebase. 😅 |
@algomaster99 we migrated to Gatsby and prisma.js, so it's completely different now and not related even to the work we had done in this PR |
@shcheklein Oh okay. But where is this lexer written? How is the syntax highlighting handled now? |
Fixes #541