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

Parsing error when parsing nested bold+ital #279

Open
ShadiestGoat opened this issue Mar 21, 2023 · 0 comments
Open

Parsing error when parsing nested bold+ital #279

ShadiestGoat opened this issue Mar 21, 2023 · 0 comments

Comments

@ShadiestGoat
Copy link

I want to parse the following text: **bold *ital***, expecting bold ital, but I'm getting bold *ital*.

This is caused by close the strong tag on the first instance of 2 *s, even though there is an open ital tag *.

what its being parsed as now:

[
	{
		"content": "bold *ital",
		"type": "bold"
	},
	{
		"content": "*",
		"type": "text"
	}
]

what it should be parsed as:

[
	{
		"type": "bold",
                "children": [
	           {
		     "content": "bold ",
		     "type": "text"
	           },
	           {
		     "content": "ital",
		     "type": "ital"
	           }
                ]
	}
]
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

1 participant