Skip to content

Commit

Permalink
fix: clarify definition of a paragraph break (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrossinek authored Jan 7, 2023
1 parent 2f607c4 commit 6f24e7d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions 1.0-specification.norg
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,17 @@ version: 1.0

** Paragraphs
Paragraphs are then formed of consecutive {** paragraph segments}. A paragraph is terminated by:
- A <paragraph break> (two consecutive {*** line endings})
- A {$ paragraph break}
- Any of the {* detached modifiers}
- Any of the {** delimiting modifiers}
- Any of the {** ranged tags}
- Any of the {*** strong carryover tags}

$ Paragaph Break
A paragraph break is defined as an _empty line_. In the simplest case that means two consecutive
{*** line endings} but since Neorg is a /free-form/ markup language, a line which only contains
whitespace is also considered empty.

* Detached Modifiers
Norg has several detached modifiers. The name originates from their differentiation to the
{* attached modifiers}, which will be discussed later.
Expand Down Expand Up @@ -241,8 +246,8 @@ version: 1.0
Furthermore, in contrast to most other (standard) {* detached modifiers}, this detached modifier
type has /no/ title, and affects the following `paragraph` instead of only the next
{# paragraph segments}[paragraph segment]. Said paragraph then becomes the modifier's /content/.
This means that in order to terminate the detached modifier contents, you need two consecutive
{*** line endings} (see {# paragraph break}).
This means that in order to terminate the detached modifier contents, you need an empty line (see
{$ paragraph break}).

Below you will find some examples of nestable detached modifiers.

Expand Down Expand Up @@ -460,7 +465,7 @@ version: 1.0
** Grouping
Both nestable and range-able detached modifiers have a unique quality - when several consecutive
modifiers /of the same type/ are encountered (by consecutive we mean _NOT_ separated via a
{# paragraph break}), they are treated as one whole <object>. This is crucial to understand as
{$ paragraph break}), they are treated as one whole <object>. This is crucial to understand as
it is required for the many types of {** carryover tags} to function.

*** Examples
Expand All @@ -482,7 +487,7 @@ version: 1.0
|example
- List item in one list

- This item is in another list, because we used a {# paragraph break} to split these items
- This item is in another list, because we used a {$ paragraph break} to split these items
|end

** Delimiting Modifiers
Expand Down Expand Up @@ -1078,15 +1083,15 @@ version: 1.0
+name attached modifier range
- ::
{* Attached modifiers} can only span at maximum a single {# paragraphs}[paragraph], i.e. they get
terminated as soon as they encounter a {# paragraph break}.
terminated as soon as they encounter a {$ paragraph break}.

This means that this:
|example
*this

text*
|end
will *not* result in any bold text, as it's divided by a {# paragraph break}.
will *not* result in any bold text, as it's divided by a {$ paragraph break}.
However, this:
|example
*this
Expand Down

0 comments on commit 6f24e7d

Please sign in to comment.