-#!/usr/bin/env python2.7
+#!/usr/bin/env python
# encoding: UTF-8
from __future__ import absolute_import, division
s = f.read(MAX_LEN+1)
if len(s) > MAX_LEN:
return False
- s = s.strip()
- if '\n' in s:
- return False
- m = SO_RE.search(s)
+ lines = [line for line in s.rstrip().split('\n') if not line.startswith('.\\"')]
+ if len(lines) != 1:
+ return False
+ m = SO_RE.search(lines[0])
if not m:
return False
link = m.group(1)