Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PrismJS #27

Open
buildersbrewery opened this issue Jun 19, 2017 · 1 comment
Open

Add support for PrismJS #27

buildersbrewery opened this issue Jun 19, 2017 · 1 comment
Assignees
Labels

Comments

@buildersbrewery
Copy link
Owner

Add support for https://github.com/PrismJS/prism.

@buildersbrewery
Copy link
Owner Author

Prism.languages.lsl = Prism.languages.extend('clike', {
    'keyword': '',
    'number': '',
    'function': '',
    'operator': '',
//  TODO: disallow ":"
    'punctuation': ''
});

Prism.languages.insertBefore('lsl', 'keyword', {
    'regex': {
        pattern: '',
        lookbehind: true,
        greedy: true
    }
});

Prism.languages.insertBefore('lsl', 'string', {
    'template-string' {
        pattern: '',
        greedy: true,
        inside: {
            'interpolation' : {
                pattern: '',
                inside: {
                    interpolation-punctuation: {
                        pattern: '',
                        alias: 'punctuation'
                    },
                    rest: Prism.languages.lsl
                }
            }
        },
        'string': ''
    }
});

Prism.languages.lindenscriptinglanguage = Prism.languages.lsl;
Prism.languages.secondlife = Prism.languages.lsl;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant