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

Links in [p] occassionally misbehave #650

Open
nuclearGoblin opened this issue Jun 15, 2020 · 2 comments
Open

Links in [p] occassionally misbehave #650

nuclearGoblin opened this issue Jun 15, 2020 · 2 comments

Comments

@nuclearGoblin
Copy link

Describe the bug
Links in paragraph blocks point to the wrong place in some cases when text is placed between said paragraph blocks and inconsistent spacing is used.

Specifically, if I use three paragraph blocks, each containing links, and place text between the first two paragraph blocks (with no blank lines between [/p] or [p] and the text), the links in the third paragraph block function as the links in the first, following the same order that they were presented in the first.
This issue goes away if there is a blank line before and after the text that occurs between paragraph blocks. It also goes away if there is no spacing between the second and third paragraph blocks.

To Reproduce
An example that produces this bug:

[p]
[Google](https://google.com)
[/p]
asdf
[p]
[reddit](https://reddit.com)
[/p]

[p]
[yahoo](https://yahoo.com)
[/p]

In this example, the link labelled "yahoo" points to https://google.com when the page is built.

Expected behavior
Links point to the url provided with the link, regardless of spacing between text and paragraph blocks. Alternatively, documentation specifies what spacing between code should be to prevent issues if misbehavior is expected to result from inconsistent spacing.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox
  • Version: Idyll version 4.12.0 (Also detected in 4.10.3)

Additional context
Putting a blank line after text following the first paragraph block, but no blank line before the text, causes the second paragraph's links to misbehave instead of the third's. If the misbehaving paragraph block has more links than the first, the first so many links will misbehave but any "extra" links will function as normal.

@mathisonian
Copy link
Member

Thanks for flagging this @gerudo7, it definitely seems like a bug in the link handling logic in the compiler.

Have you noticed if this is only an issue when p-tags are at the top level or does the same thing persist if the tags are nested, e.g.

[div]

  [p] 
    ...
  [/p]

[/div]

@nuclearGoblin
Copy link
Author

It looks like this still happens when they are nested like this, both when they are all in separate divs and when they are all in the same one.

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

No branches or pull requests

2 participants