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

Can errors be ignored? #21

Open
mark22 opened this issue Oct 1, 2018 · 4 comments
Open

Can errors be ignored? #21

mark22 opened this issue Oct 1, 2018 · 4 comments

Comments

@mark22
Copy link

mark22 commented Oct 1, 2018

Right now If i give it this BBCode

[quote]
[/b]Testing
[/quote]

It won't parse at all, because of the misaligned tags. But since this is a fairly benign user error, is there a way to have the script ignore the errors and atleast still parse the quote bbcode?

Thanks for the amazing script otherwise!

@patorjk
Copy link
Owner

patorjk commented Oct 1, 2018

For now there’s no easy way I know of to detect and ignore small errors, sorry.

@mark22
Copy link
Author

mark22 commented Oct 1, 2018

@patorjk Darn. Do you think there is a way to close the mismatched tags so it would not error?

@patorjk
Copy link
Owner

patorjk commented Oct 2, 2018

You'd have to edit the lib to catch that kind of case, which may be easy for this case, but you could end up going down a rabbit hole on what kind of errors you want to ignore or what errors make sense to ignore, and not all of them would be easy to catch and correct in a way that makes sense.

@mark22
Copy link
Author

mark22 commented Oct 3, 2018

@patorjk Definitely would want this to work in every case of a mismatched tag. I found the lines where the mismatched tag error message is added to the errorqueue, and tried to work on ret.html from here. But it seems that at this point the script just looks to see if there are any '[' or ']' and if they are there it knows there was a problem with the processing in replacing all the [] tags, is that correct? If so, then this probably is not the place to try to correct the mismatched tags because its already too late, in a sense?

Thanks!

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

2 participants