Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge Cases Thread #24

Open
vhyrro opened this issue Jul 7, 2023 · 13 comments
Open

Edge Cases Thread #24

vhyrro opened this issue Jul 7, 2023 · 13 comments

Comments

@vhyrro
Copy link
Member

vhyrro commented Jul 7, 2023

All the Edge Cases

The specification isn't perfect, and as such this thread exists for any other parser writers to ask questions or note inconsistencies/ambiguities in the spec.

cc @boltlessengineer :D

@boltlessengineer
Copy link

whitespace/end-of-line rules in link destination:

{/ pa
th/to
/file.txt}

{:pa th/t\ o/file:}

{:path/t\
o/file:}

@boltlessengineer
Copy link

link destinations should be case-insensitive

I couldn't find this in doc, but Neorg seems to be working like this.

$ Paragraph Break
description

... {$ Paragraph Break} ... %this is valid%
... {$ paragraph break} ... %this is also valid%

@boltlessengineer
Copy link

boltlessengineer commented Jul 7, 2023

What happens when we put carryover tag inside attached modifiers? Considering the precedence, should it break the attached modifier? Or as line-ending inside attached modifier can be ignored, carryover tag inside attached modifier is just invalid?

*bold
+color red
text*

Similar precedence cases:

*bold
|example
text*
|end
*bold
* heading
text*

@boltlessengineer
Copy link

Does terminating slide with a paragraph break means it is only terminating that list item but not a whole list?

- :
  paragraph

- is this same list? or another list?

@boltlessengineer
Copy link

boltlessengineer commented Jul 8, 2023

Anchor link inside anchor link

[[my link]]

I think we can solve this edge case by converting to syntax sugar for wikilinks (automatically converted to {? my link})
Wiki-links are used a lot in many workflows so having extra syntax sugar made up with lowercases would be really useful.
Because anchors and wikilinks do similar things, users can think this syntax as something link hard-anchor.

@boltlessengineer
Copy link

Free form attached modifier inside headings

* Contextual `|` Delimiter
  The pipe (`|`) character ...

Cause | opens free-form attached modifier, these two lines are part of single paragraph segment inside header

@VoreckLukas
Copy link

Can @document.meta tags appear anywhere in the document or only at the beginning?
If the former, in this case:

@document.meta
title: sometitle
@end

Imagine some paragraphs here

@document.meta
title: someothertitle
@end

Does sometitle or someothertitle take precedence

@vhyrro
Copy link
Member Author

vhyrro commented Jul 17, 2023

Extra: spec doesn't define what sort of objects are allowed after a single definition (only a paragraph? or any single complex object?)

@boltlessengineer
Copy link

boltlessengineer commented Oct 9, 2023

escape sequence can be used to escape non-punctuation character, is this intended behavior?

\* - this is common usecase of escape sequence

\a - and this is also escape sequence according to spec

@boltlessengineer
Copy link

Injection to link location

* evil link injection} {https://example.com

link to {* evil link injection} {https://example.com}[that heading]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Should spec disallow { and } characters inside link location?

@boltlessengineer
Copy link

Structable's prefix inside attached modifiers?

*bold
- 
word*

If there is no following whitespace in line 2, this would be valid attached modifier, right?
But if line 2 is - (- followed by whitespace,)
is this valid attached modifier or syntax error for unordered list?

@vhyrro
Copy link
Member Author

vhyrro commented Oct 9, 2023

Since detached modifiers have a higher precedence than attached modifiers it becomes an unclosed *bold, a syntax error for the unordered list and then word*

@vhyrro
Copy link
Member Author

vhyrro commented Oct 9, 2023

escape sequence can be used to escape non-punctuation character, is this intended behavior?

\* - this is common usecase of escape sequence

\a - and this is also escape sequence according to spec

Yep, it is! It's for the sake of consistency. It won't do anything, in fact it will just return an a as is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants