wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism
MIT License
724 stars 35 forks source link

Dependencies between languages #7

Closed otakustay closed 6 years ago

otakustay commented 6 years ago

Prism's languages may depend on each other, for example, the vbnet requires basic to register before it, smarty, erb, php and soy require markup-templating as their base language

Currently, refractor doesn't handle the dependencies for each language, so code below will fail:

const refractor = require('refractor/core');
refractor.register(require('refractor/lang/vbnet'));

Will it be solved if vbnet's source code requries basic and register it itself?

wooorm commented 6 years ago

You found the only one! vbnet apparently used double quotes, the rest use single quotes, and the regex in here didn’t work for those!