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

Don't raise an exception, simply have a class for unknow tag #9

Open
moi15moi opened this issue Apr 25, 2022 · 2 comments
Open

Don't raise an exception, simply have a class for unknow tag #9

moi15moi opened this issue Apr 25, 2022 · 2 comments

Comments

@moi15moi
Copy link

Currently, ass_tag_parser can't parse VSFilterMod tag which is totally ok, because they have they are useless.

But, it would be better if it could not raise an exception. It should simply have a class for unknowtag.

Here is the code I have:

result = parse_ass(
    r"{\fnJester\fsc20}test"
)
print(result)

What it currently does:
ass_tag_parser.errors.BadAssTagArgument: syntax error at pos 16: \fs requires an integer

What it could do:
[AssTagListOpening(), AssTagFontName(name='Jester'), AssUnknowTag(text=fsc20), AssTagListEnding(), AssText(text='test')]

@rr-
Copy link
Collaborator

rr- commented Apr 26, 2022

@moi15moi

The AssUnknownTag approach won't work because we don't know the grammar of unknown tags. We don't know where they end and where a comment should start.

Since I don't have time to actively maintain this project, please consider opening a pull request that introduces strict argument to the parse function which ignores exceptions and treats unknown tags as comments.

@moi15moi
Copy link
Author

Thanks for the fast answer.

I will see if I do something, but I doubt I will be able to do anything.

jpenney added a commit to jpenney/ass_tag_parser that referenced this issue Oct 26, 2024
Addresses bubblesub#9 (at least partly, see tests)
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