Formatting guidelines help us to ensure that code is consistent, more readable, well-formatted which can enhance the quality and effectiveness of communication.
It is important for creating maintainable, efficient, and collaborative codebases.80-char
: 80 char in text editorlist-indentation
: Consistent markdown list indentation while wrappingsection-gap
: One line space between two sectionsreadability
and make it easier for readers to distinguish different parts
of the content.-- component planning:
-- ftd.row:
margin-top.px: 26
padding-left.px: 50
width.fixed.px: 1400
height: fill-container
-- end: ftd.row:
-- end: planning
-- component planning:
-- ftd.row:
margin-top.px: 26
padding-left.px: 50
width.fixed.px: 1400
height: fill-container
-- end: ftd.row:
-- end: planning
colon-after-space
: One char space after :
one character space after a colon
in written
language is used to improve the readability
of the text and make it easier
for readers to distinguish between the preceding textand the
information
that follows`.-- ftd.text:Hello
-- ftd.text: Hello
component-gap
: 10 line space between two componentsformatting technique used to create a clear visual separation
and help
organize the content for easier reading and comprehension.-- component c1:
content of component goes here
-- end: c1
-- component c2:
content of component goes here
-- end: c2
-- component c1:
content of component goes here
-- end: c1
-- component c2:
content of component goes here
-- end: c2
end-line
: ensure a document ends with a trailing new lineIt is done to ensure that the last line of code in the file does not end without a newline.
This is because some programming languages or tools might interpret the lack of a newline character as an error or warning, and it can also cause problems when different code files are merged or concatenated. Therefore, adding a newline at the end of the document is a good practice to ensure consistent behavior across different tools and systems.-- ds.page: Page 1
content goes here.
-- end: ds.page
-- ds.page: Page 1
content goes here.
-- end: ds.page
space-around-expression
: One char space at the start and end of conditional expressionThe convention of including a single space character before and after a conditional expression is a common coding style that helps to make the code more readable and easier to understand.
Including these spaces is not strictly necessary for the code to function correctly, but it is considered good coding practice and can help make the code easier to maintain and modify in the future.-- integer num: 1
-- ftd.text: Number is 1
if: {num == 1}
-- integer num: 1
-- ftd.text: Number is 1
if: { num == 1 }
space-before-emoji
: One char space before emojiEmoji are often considered as part of text in modern communication, and it is essential to give proper formatting and spacing to ensure clear and effective communication. When using an emoji after a word, it is recommended to treat it as a separate word and leave a one-character space before the emoji.
Just as we give space between two different words, it is advisable to treat words followed by emojis as two separate entities to maintain clarity and effective communication.;; -------- Example 1 --------
-- ds.page: Formatting🚧
;; -------- Example 2 --------
-- fastn.sitemap:
# Guidelines🚧
## Formatting🚧
- Space before emoji🚧: /url/
;; -------- Example 1 --------
-- ds.page: Formatting 🚧
;; -------- Example 2 --------
-- fastn.sitemap:
# Guidelines 🚧
## Formatting 🚧
- Space before emoji 🚧: /url/