对于 DockerFile , docker-compose 使用 dockerfile 语言学家.这是默认的语言学家. ```dockerfile来自golang:1.10-alpine3.8ENV NAME示范ENV SOURCEROOT/go/src/github.com/${NAME}复制 .$ {SOURCEROOT}WORKDIR $ {SOURCEROOT}......``` I wrote a README.md with parts of code and I want to highlight those parts with the right colors.One of this code is a .gitignore code, that I would like to integrate to my README.md. But I can't have the good linguist highlight for this, which colorize in green my comments for example.I have searched some languages detected by GFM but I am not satisfied by the results.Can someone help me to find the good linguist ?P.S. : I also want to question for a DockerFile, docker-compose in a REAMDE code highlight.Thanks,MushuLeDragon 解决方案 For .gitignore there is no default linguist available by sh is the closest match so you can use that.Example: https://gist.github.com/binki/7e0710d92863276ba39091cb299725bdAnd for DockerFile, docker-compose use dockerfile linguist. It's default linguist.```dockerfileFROM golang:1.10-alpine3.8ENV NAME demoENV SOURCEROOT /go/src/github.com/${NAME}COPY . ${SOURCEROOT}WORKDIR ${SOURCEROOT}......``` 这篇关于如何突出显示README.md的.gitignore代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-29 18:50
查看更多