Open citorva opened 1 month ago
Hello! I agree, and am currently working on this.
After using the module, this issue was indeed a non-issue because the syntax is made from a raw element and the lang parameter is just a description of the code label.
This is indeed possible with the current release. I will still be adding native support for this, for convenience and future-proofing.
I have rechecked and sourcerer lost syntax colorization with custom syntaxes. I reopen then the issue
A temporary working workaround was replacing the last raw call with this code:
let source_args = (
lang: source.lang
)
if source.has("theme") {
source_args.insert("theme", source.theme)
}
if source.has("syntaxes") {
source_args.insert("syntaxes", source.syntaxes)
}
raw(block: true, ..source_args, unlabelled-source)
The
raw
function allows to use custom or less known language through thesyntaxes
which takes a path to asublime-syntax
file. It looks good add a same argument to allows the use of sourcerer with custom syntaxes