You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of the effort to tidy up outstanding pull requests and merge them into a new branch, I've found myself coming across two issues relating to PRs for new lexers: one specific and one broad.
First, what should new lexers do if they define a filename that conflicts with a filename in an existing lexer? Should any PR that adds a lexer with a conflicting filename implement the self.detect? method on the new lexer? Does it need to implement the same method in the other lexer as well?
Second, is there a clear position about what tests new lexers should implement? I've looked through various lexers that are part of Rouge and there doesn't seem to be a consistent pattern. Most seem to test all filenames that are defined. Most seem to test all mimetypes that are defined. After that, it becomes a bit of a free for all.
As part of the effort to tidy up outstanding pull requests and merge them into a new branch, I've found myself coming across two issues relating to PRs for new lexers: one specific and one broad.
First, what should new lexers do if they define a filename that conflicts with a filename in an existing lexer? Should any PR that adds a lexer with a conflicting filename implement the
self.detect?
method on the new lexer? Does it need to implement the same method in the other lexer as well?Second, is there a clear position about what tests new lexers should implement? I've looked through various lexers that are part of Rouge and there doesn't seem to be a consistent pattern. Most seem to test all filenames that are defined. Most seem to test all mimetypes that are defined. After that, it becomes a bit of a free for all.
/cc @jneen @dblessing @ashmaroli @vidarh
The text was updated successfully, but these errors were encountered: