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
This suggestion stems from @boltlessengineer's idea on discord. The goal of this suggestion is to generalize the : syntax to make more sense in the context of the Norg specification.
With these new changes, the old scoping modifier (:) is substituted just for : (no surrounding spaces).
When a link starts with :, this starts a scope at the path to the current file. Therefore, {:myfile} is a link to myfile.norg in the current directory. Of course, {:myfile:} is still permitted, it's just that the second scoping modifier does nothing.
This makes the entire syntax much more intuitive. For instance, {:myfile:* Heading} now makes logical sense: first, we enter the scope of the current dir, then myfile.norg, then we limit the scope to just * Heading.
The reason the old syntax required surrounding whitespace is to prevent situations like this:
* My Life: The Truth
This is a link to {* My Life: The Truth}.
With this new syntax proposal the : has a higher precedence within a link, therefore to link to such a heading one would need to escape the colon using \:. This is a fair compromise (there is no better alternative without massively altering syntax).
The text was updated successfully, but these errors were encountered:
This suggestion stems from @boltlessengineer's idea on discord. The goal of this suggestion is to generalize the
:
syntax to make more sense in the context of the Norg specification.With these new changes, the old scoping modifier (
:
) is substituted just for:
(no surrounding spaces).When a link starts with
:
, this starts a scope at the path to the current file. Therefore,{:myfile}
is a link tomyfile.norg
in the current directory. Of course,{:myfile:}
is still permitted, it's just that the second scoping modifier does nothing.This makes the entire syntax much more intuitive. For instance,
{:myfile:* Heading}
now makes logical sense: first, we enter the scope of the current dir, thenmyfile.norg
, then we limit the scope to just* Heading
.The reason the old syntax required surrounding whitespace is to prevent situations like this:
With this new syntax proposal the
:
has a higher precedence within a link, therefore to link to such a heading one would need to escape the colon using\:
. This is a fair compromise (there is no better alternative without massively altering syntax).The text was updated successfully, but these errors were encountered: