You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lua: comments.md incorrectly shows comment close as ]]-- (#5925)
* Lua: comments.md incorrectly shows comment close as ]]--
This is wrong, as in the case
```lua
print(--[[ I am a comment ]]-- 123)
```
The way to close a multiline comment is to close the string with `]]
```lua
print(--[[ I am a comment ]] 123)
```
* Update comments.md
* Update comments.md
* Update comments.md
---------
Title: 'Comments'# Required; the file name should be the same as the title, but lowercase, with dashes instead of spaces, and all punctuation removed
3
-
Description: 'A comment is text within a program that is not being executed. It can provide additional information to support understanding the code.'# Required; ideally under 150 characters and starts with a noun (used in search engine results and content previews)
4
-
Subjects:# Please only use Subjects in the subjects.md file (https://github.com/Codecademy/docs/blob/main/documentation/subjects.md). If that list feels insufficient, feel free to create a new Subject and add it to subjects.md in your PR!
2
+
Title: 'Comments'
3
+
Description: 'A comment is a text within a program that is not being executed. It can provide additional information to support understanding the code.'
4
+
Subjects:
5
5
- 'Computer Science'
6
-
Tags:# Please only use Tags in the tags.md file (https://github.com/Codecademy/docs/blob/main/documentation/tags.md). If that list feels insufficient, feel free to create a new Tag and add it to tags.md in your PR!
6
+
Tags:
7
7
- 'Comments'
8
8
- 'Documentation'
9
-
CatalogContent:# Please use course/path landing page slugs, rather than linking to individual content items. If listing multiple items, please put the most relevant one first
9
+
CatalogContent:
10
10
- 'learn-lua'
11
11
- 'paths/computer-science'
12
12
---
13
13
14
-
A **comment** is text within a program that is not being executed. It can provide additional information to support understanding the code.
14
+
A **comment** is text within a program that is not being executed. It can provide additional information to help understand the code.
15
15
16
16
## Single-line Comments
17
17
18
-
In Lua, two consecutive dashes are used to create singleline comments. The compiler does not read any text after `--` on the same line.
18
+
In Lua, two consecutive dashes are used to create single-line comments. The compiler reads no text after `--` on the same line.
19
19
20
20
```lua
21
21
functionsum(number1, number2)
@@ -29,11 +29,12 @@ The comment does not affect the function.
29
29
30
30
## Multi-line Comments
31
31
32
-
In Lua, multi-line comments are created using the `--[[` syntax to start the comment, and `]]--` to end the comment. The compiler does not read any text in between.
32
+
In Lua, multi-line comments are created using the `--[[` syntax to start the comment and `]]` to end the comment. The compiler does not read any text in between.
0 commit comments