Closed r0ckarong closed 7 years ago
Using Atom 1.15.0 on Ubuntu 16.10 LTS
Same problem with Markdown and Java language (but not reproduce with a valid JS syntax). It's a problem with Java core package of Atom.
Workaround: close the class with a }
[source,java]
----
final class MonoJust<T> extends Mono<T> implements Fuseable.ScalarCallable<T>, Fuseable {
final T value;
MonoJust(T value) {
this.value = Objects.requireNonNull(value, "value");
}
// ..
}
----
@r0ckarong in Atom, code block must be "valid" code.
If you want to use ...
comment the line: // ...
.
If you open a structure, close it.
I never knew that you have to properly close code. I just grabbed some random piece of code from the highlighter testpage to plug into my test document.
Does that really mean I can't grab "broken" snippets of code to display in a block? I would assume the block is self contained and the contents shouldn't matter.
The grammar parser in Atom have limit with multi-line content, if you use an element with a multi-line structure (like {}
) you must close it.
That's good to know. Thank you.
This actually strikes me as a bit strange. We know the boundaries of the block because they are well-defined. I'm surprised that we aren't giving just the contents of the block to the syntax highlighter to highlight. In other words, the closing ----
should be a hard stop.
I guess we'd have to somehow weave into every language to abort if it sees the block delimiter. But I'm not sure if and how that can be done. Because that's how Asciidoctor works.
It's not a surprise for me, it's the basic Atom parsing behavior with embedded language.
----
it's not a "hard stop", because "hard stop" doesn't exist.
I'm just saying it's surprising that Atom didn't implement a hard stop...because it exists in many lightweight markup languages.
Description
When you specify a code type for a code block, text that is outside of the block gets reformatted with different colors. This appears to have started in one of the recent releases. I didn't notice this with 1.7.0
Screenshots
Set to "java"![java](https://cloud.githubusercontent.com/assets/4920542/24751286/4261a04e-1ac9-11e7-911e-62f4461f7a9b.png)
Set to "javascript"![javascript](https://cloud.githubusercontent.com/assets/4920542/24751284/425fc8fa-1ac9-11e7-8f3b-576dc6ae7c01.png)
No specified source type![normal](https://cloud.githubusercontent.com/assets/4920542/24751285/4260c7f0-1ac9-11e7-8b73-d088fe33b412.png)
Syntax example
https://gfycat.com/EcstaticOldBluetonguelizard