Allow manipulation of comments in the Script Info section#36
Open
ItMightBeKaraoke wants to merge 2 commits into
Open
Allow manipulation of comments in the Script Info section#36ItMightBeKaraoke wants to merge 2 commits into
ItMightBeKaraoke wants to merge 2 commits into
Conversation
The idea here is that a user of this library should have the ability to add Script Info comments to an ass document. When parsing a file, they are also preserved. It may make more sense to allow them in any section, but as I understand it the spec only mentions ";" comments to be available in Script Info so that is all that is implemented here. The existing functionality of ignoring lines starting with ";" in other sections is maintained. Note that while this retains the order of the comments, it will always put them in their customary position at the beginning of the Script Info, before any of the fields, rather than tracking any position they could have interleaved between the field lines. This means they can't be used as comments for particular fields, but I don't think that was ever an intended use case of these comments anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idea here is that a user of this library should have the ability to add Script Info comments to an ass document. When parsing a file, they are also preserved. It may make more sense to allow them in any section, but as I understand it the spec only mentions ";" comments to be available in Script Info so that is all that is implemented here. The existing functionality of ignoring lines starting with ";" in other sections is maintained.
Note that while this retains the order of the comments, it will always put them in their customary position at the beginning of the Script Info, before any of the fields, rather than tracking any position they could have interleaved between the field lines. This means they can't be used as comments for particular fields, but I don't think that was ever an intended use case of these comments anyway.