Codimd: Makefile syntax highlight

Created on 25 Mar 2017  路  9Comments  路  Source: hackmdio/codimd

It would be great if makefile highlighting
is supported in code block.

Hacktoberfest enhancement feature syntax highlighting

Most helpful comment

Thanks @yangyang95
Makefile is popular format , we will support it.

All 9 comments

Thanks @yangyang95
Makefile is popular format , we will support it.

That's a good news. Thanks a lot.

I found we have already support makefile syntax highlighting.
Please use cmake in the code block language.

This is what I got using cmake, code block at right doesn't display properly.
make
And it would be better if the code display same as the Prism which I know hackmd is using.

Attached the code here for testing

ifeq ($(strip $(THREAD_TEST)),1)
CFLAGS_opt  += -D THREAD_TEST
endif

thread_test: main.c
    for i in `seq 1 128`; \
    do $(MAKE) phonebook_opt THREAD_TEST=1 THREAD=$$i --silent; \
    ./phonebook_opt; echo "\n"; \
    rm -rf phonebook_opt; \
    done;

And I found out github display it good, too. lol
Thanks.

@yangyang95 Actually we use both highlight.js and Prism both for different code languages.
Shame on highlight.js not handle that properly, you could raise a issue for them.
I will change the cmake highlighting to Prism for now.

Changed in b2985085d011cad374c76ae75f548fdefb15c258

Oh, mind that cmake and makefile seems to be different. Though I had no idea, since I have never used cmake.
reference:

Hmm, but our editor CodeMirror seems only support cmake in the official release.
highlight.js supports cmake and makefile.
Prism supports only makefile.

This should be consider again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neopostmodern picture neopostmodern  路  4Comments

ccoenen picture ccoenen  路  4Comments

SISheogorath picture SISheogorath  路  4Comments

almereyda picture almereyda  路  4Comments

sagesharp picture sagesharp  路  4Comments