Nested line comment in block comment -- VERY STRANGE #1081
guyutongxue
started this conversation in
General
Replies: 1 comment 2 replies
-
Can you open an issue on this? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Seems that Typst supports nesting line comment in block comment, and it is intentional.
But all other languages with C-style comments does not support this (C, C++, C#, Java, JavaScript, Rust, PHP, Swift, etc.).
This cause some strange error which is hard to discover:
Here is a sentence. /* We should add a reference from https://en.wikipedia.org/blahblah */ This is another sentence. This is next paragraph.
In above example, all content after the "block comments" disappeared, because the "https://" is commenting "*/" out. Very strange, isn't it?
I suggest to change the syntax here, or specify this feature on the documentation.
Beta Was this translation helpful? Give feedback.
All reactions