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

Waypoint callout is Bugged #101

Open
AlyceOsbourne opened this issue Apr 7, 2024 · 2 comments
Open

Waypoint callout is Bugged #101

AlyceOsbourne opened this issue Apr 7, 2024 · 2 comments

Comments

@AlyceOsbourne
Copy link

When nesting a waypoint inside a callout, it causes the callout to not be cleared before being updated properly.

Before a file is added it looks like this
image
After
image
I am not sure the code the detects the contents of the waypoint takes into account the >

@ltchin
Copy link

ltchin commented Apr 26, 2024

I think I found the issue. In lines 234-243 of main.ts

if (waypointStart === -1 && (trimmed.includes(waypointFlag) || trimmed.includes(beginWaypoint))) {
	isCallout = trimmed.startsWith(">");
	initialWaypoint = trimmed.includes(waypointFlag);
	waypointStart = i;
	continue;
}
if (waypointStart !== -1 && trimmed === endWaypoint) {
	waypointEnd = i;
	break;
}

There should be a line to change endWaypoint to have a > marker in front as well. Probably before the continue; . I'm pretty sure waypointEnd just stays as -1, which is why it would overshoot.

I do not have a Typescript dev environment though, so I can not test if the fix works. Would appreciate if someone could try it and see if that fixes it.

@j-adel
Copy link

j-adel commented Sep 6, 2024

I really hope someone can make a built out of @ltchin 's suggestion. Callouts are a must have for me to use this plugin, unfortunately :/

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