[vlc-commits] cue.lua: simplify pattern matching
Pierre Ynard
git at videolan.org
Sat Jan 7 13:36:33 CET 2012
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Jan 7 13:36:27 2012 +0100| [a690ab37ea4ddd1642d8eb68d6936ed6b258c2f9] | committer: Pierre Ynard
cue.lua: simplify pattern matching
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a690ab37ea4ddd1642d8eb68d6936ed6b258c2f9
---
share/lua/playlist/cue.lua | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/share/lua/playlist/cue.lua b/share/lua/playlist/cue.lua
index 57215e0..384a40f 100644
--- a/share/lua/playlist/cue.lua
+++ b/share/lua/playlist/cue.lua
@@ -25,12 +25,9 @@ function probe()
return false
end
header = vlc.peek( 2048 )
- return string.match( header, "FILE.*WAVE%s[\r\n]+" ) or
- string.match( header, "FILE.*AIFF%s[\r\n]+" ) or
- string.match( header, "FILE.*MP3%s[\r\n]+" ) or
- string.match( header, "FILE.*WAVE%s*[\n]+" ) or
- string.match( header, "FILE.*AIFF%s*[\n]+" ) or
- string.match( header, "FILE.*MP3%s*[\n]+" )
+ return string.match( header, "FILE.*WAVE%s*[\r\n]+" ) or
+ string.match( header, "FILE.*AIFF%s*[\r\n]+" ) or
+ string.match( header, "FILE.*MP3%s*[\r\n]+" )
end
-- Helpers
More information about the vlc-commits
mailing list