Skip to content

[Feature Request] add highlight.js to auto detect code language #236

Open
@badrelmers

Description

@badrelmers

Hi,
PrismJS does not autodetect code language PrismJS/prism#1313
can you add an option to select between PrismJS and https://highlightjs.org/ because highlightjs can auto detect the language. if you do not like this idea can you please at least add the trick described here to add autodetect to PrismJS? it is only 3 lines of code:

<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script>
<script>
	document.addEventListener("DOMContentLoaded", function () {
		hljs.highlightAll();
	})
</script>

i open a lot of markdown files with code snippets without a defined language so autodetection will help a lot with that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions