edgecase
Author: StJohn Piano
This page is subject to change at any time. It is not signed by its author or by Edgecase Datafeed.
315 words - 132 lines - 4 pages





Indentation is commonly used to show the boundaries between an item and its sub-items.

Example:

<article> <title>Viewpoint</title> <author_name>stjohn_piano</author_name> <date>2017-06-28</date> <signed_by_author>no</signed_by_author> <content> "Human behavior is economic behavior. The particulars may vary, but competition for limited resources remains a constant." ~ Nwabudike Morgan </content> </article>


Starting from the left-hand side, there are two levels of indentation in this example.

There are some difficulties with managing indentation:
- Spaces vs tabs
- With many levels of indentation, it can be hard to keep track of how many indents to do in a particular section of the text.
- The introduction of spurious whitespace into the base text. In the example above, there are now four extra spaces between
constant."
and
~ Nwabudike
. These spaces are only there to handle indentation. This has several consequences: The need to manage indentation when re-using a section of text in another article, the problem of search (the indented text is now a different text string), and the difficulty involved in getting browsers to accurately render indentation.




Edgecase has decided to primarily indent by using extra blank lines.

Example:

<article> <title>Viewpoint</title> <author_name>stjohn_piano</author_name> <date>2017-06-28</date> <signed_by_author>no</signed_by_author> <content> "Human behavior is economic behavior. The particulars may vary, but competition for limited resources remains a constant." ~ Nwabudike Morgan </content> </article>





The difference is hopefully clearer in a more complex example:




<article> <title>Recipe_for_generating_entropy_bytes_using_dice</title> <author_name>stjohn_piano</author_name> <date>2018-11-13</date> <signed_by_author>no</signed_by_author> <content> <bold_lines> Parts </bold_lines> - Description - Assets - Notes - Recipe <bold_lines> Description </bold_lines> This recipe describes a method of using dice to generate entropy bytes. <bold_lines> Assets </bold_lines> Description: A script that converts dice roll results into bytes. <link> <type>asset_of_another_article</type> <article_title>Using_a_transaction_to_validate_a_Bitcoin_address</article_title> <datafeed>edgecase</datafeed> <datafeed_article_id>66</datafeed_article_id> <filename>convert_dice_rolls_to_hex_bytes_2.py</filename> <text>convert_dice_rolls_to_hex_bytes_2.py</text> <sha256>e29d31cfa9a6a7bdb3ddad31efa86168aaf62270ce09712728b20bf9613aaf0e</sha256> </link> </content> </article>





Summary of the approach: Every time you wish to visually indicate that a new sub-item has started, use blank lines to separate it from its parent item. Try to balance the number of blank lines above and below the sub-item.