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 lua block support for st3 #14

Merged
merged 1 commit into from
Mar 18, 2017

Conversation

yanxurui
Copy link
Contributor

@yanxurui yanxurui commented Mar 1, 2017

I add a small piece of code to support *_by_lua_block in st3.

Not supported in st2

Forgive me that I don't want to waste time modifying tmLanguage version to implement the same feature because I am not familiar with it and st2 is not recommended.

Further more, I doubt whether tmLanguage supports embedded language because sublime_syntax is superset of tmLanguage and sublime_syntax supports more features.

Limit to lua code

Only lua block is supported because inline lua code is discouraged.

Beside, Lua code block is ended by an alone } in a new line so lua table's } must not be placed that way. I can not mange to solve this and maybe it can not solved because inline javascript in html has the same problem:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script>
        var str = '</script>';
        // </script>
    </script>
</head>
<body>
    <h1>hello world</h1>
</body>
</html>

</script> in string or comment will break the javascript code and return to html.

If there is a way to fix this, don't forget to notify me.

Thank you.

@brandonwamboldt brandonwamboldt merged commit 9113c4a into brandonwamboldt:master Mar 18, 2017
@brandonwamboldt
Copy link
Owner

Many thanks!

@vstath
Copy link

vstath commented Aug 5, 2018

I'm late for the party but I wanted to thank you also

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

Successfully merging this pull request may close these issues.

3 participants