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

Update Parlot to 1.0 #34

Closed
wants to merge 3 commits into from

Conversation

MikeAlhayek
Copy link

@MikeAlhayek MikeAlhayek commented Jul 22, 2024

Fix #35

@MikeAlhayek
Copy link
Author

@sebastienros please approve this workflow to run.

Also this line is throwing an exception
https://github.com/MikeAlhayek/shortcodes/blob/280261cb668e65f6c77c0d967ad0477bde5b85b7/src/Shortcodes/ShortcodesParser.cs#L146

System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values. (Parameter 'start')

Maybe using _scanner.Cursor.Offset is not the correct value for start.

@@ -128,17 +128,17 @@ private Shortcode ParseShortcode()
{
arguments ??= CreateArgumentsDictionary();

arguments[argumentIndex.ToString()] = Character.DecodeString(new TextSpan(_scanner.Buffer, _result.Start + 1, _result.Length - 2)).ToString();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably wrong. Start is the beginning of the result, and Offset is the current position. So Offset should be stored as a local Start before the call to Read

@sebastienros
Copy link
Owner

There is a bug in Parlot

@MikeAlhayek
Copy link
Author

@sebastienros yes that is what I am thinking too. Because the line that is throwing the exception is in Parlot.

@sebastienros
Copy link
Owner

You can close this PR, I had to do several changes in Parlot to get all the tests passing

@MikeAlhayek MikeAlhayek deleted the ma/update-parlot branch July 23, 2024 15:23
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

Successfully merging this pull request may close these issues.

Update Parlot to 1.0
2 participants