-
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
pug: Improved class and id in tag detection #2358
Conversation
…g detection, and added corresponding unit test.
Thank you for making this PR @dev-itsheng! To make the build pass, you have to install Prism's dependencies using Please also take a look at my comment, and please stop lewding Chino. |
Yes, your solution is better than mine. At first, I find that If insert it after I will make a new PR by correct method soon. Thanks you for this reply. |
Glad, I could help. Also, you don't need to make a new PR, you can just commit and push updates in this one. |
I rewrite code, run |
My previous avatar is just for fun, but I changed it immediately. |
In fact, I has already considered it. In my opinion, prism supported many languages, it's possible that another language has similar On the other hand, I reviewed some theme CSS files, they use Final, I choose |
Sound reasoning. Then let's keep it as is. |
Thank you for contributing @dev-itsheng! |
You could delete your fork (I see some people do this, don't be like them) but you can also just use the features git has for this: I won't go into the details because git can be complicated at first but this is what you have to do:
Your fork is now up to date. For a new PR, make a branch from the master branch of your fork. The IDE you use probably has some nice way of doing this. Make your commits into that new branch. To make a PR, publish your branch to your fork. After that is done, GitHub itself will offer you to make a PR when you visit either PrismJS/prism or your fork. I hope this helps. |
Thanks for your help. In fact, I has already try to use Google to search like 'GitHub new PR after PR' and other keywords, but don't get any useful information, and GitHub always gives me a suggest of deleting this fork, like this: So I'm afraid of previous commit and push will have an influence on next PR, but after reading your answer(my English is poor, too, hope my understand is correct), my worry is unnecessary. I can continue to commit and push code in this fork(after up to date, if my commit is latest, I couldn't do something about merge). |
Yeah, I can image that you won't find anything useful there. From my experience, when I started with git, I only found one guy who actually explained how you do this fork updating (but only that). Git isn't easy to learn but once you get it, it's super useful because literally everything you might want to do with git, you can do. Git is super powerful. GitHub is really just a server of git repos with a nice web page. It doesn't do a whole lot when you actually use git. My recommendation: Take your time to really learn git (not just GitHub). It doesn't have to be all at once. As a start, try to understand why you had to do everything I described in my previous comment. This article (GitHub focused) should explain it. Focus on the concepts not the commands. |
pug: Improved class(named
"attr-class"
) and id(named"attr-id"
) in tag detection, and added corresponding unit test.In order to distinguish the id, class and pure tag declared by the tag in the pug, two regular expressions judgment are added to the corresponding code, and analogous unit testings.
Similarly, the next PR is to add judgments on id, class, pesudo (pesudo-class and pesudo-element), ... in Stylus, it is comming soon.