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

Code block fencing is broken with stateful constructs in 3129 #430

Closed
djspiewak opened this issue Apr 19, 2017 · 5 comments · Fixed by sublimehq/Packages#1035
Closed

Code block fencing is broken with stateful constructs in 3129 #430

djspiewak opened this issue Apr 19, 2017 · 5 comments · Fixed by sublimehq/Packages#1035

Comments

@djspiewak
Copy link

broken stuffs

A slightly more minimal text example is as follows:

```scala
object Foo {
}
```

Testing?

The Scala mode uses the stateful set directive in the new sublime-syntax format as part of handling the object definition, and the very first state transition follows object Foo. I'm pretty sure this is what is screwing up MarkdownEditing's embedding. Note that, oddly, the embedded syntax continues to work until the end of the fenced block, even though the background styling indicating that fenced block is broken.

My current workaround is tossing the following after every broken fenced block:

<!--
```
-->

That's not great, but it works.

I suspect this is a bug in Sublime itself, but I thought I would file it here first to confirm.

@djspiewak
Copy link
Author

Any updates on this?

@djspiewak
Copy link
Author

@felixhao28 I found the bug. It's an issue in the Scala mode (which I maintain, so… whoops). Can confirm that when the now-linked PR is merged, the bug as described in the OP goes away. Would you like me to close this issue now? Or should I wait until the PR is merged?

@felixhao28
Copy link
Contributor

Let's wait for the PR to be merged before closing. Maybe your case is not same as other "unclosed code scope" issue on code blocks.

@djspiewak
Copy link
Author

Oh I'm pretty sure it is (I have a merged version locally and it's working), it's just that the bug meant that we were "closing" the outer code block, rather than anything controlled by the Scala mode. So I was literally popping off your stack, which naturally messed everything up.

So it's almost like the opposite of an unclosed block: it was closed too early.

@felixhao28
Copy link
Contributor

Oh that makes sense. Let's close it then.

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 a pull request may close this issue.

2 participants