[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#693335: RFS: pymarkups/0.2.3-1



(I don't intend to sponsor this package.)

* Dmitry Shachnev <mitya57@gmail.com>, 2012-11-15, 19:52:
http://mentors.debian.net/debian/pool/main/p/pymarkups/pymarkups_0.2.3-1.dsc

License in debian/copyright is not the same as in LICENSE.

Shouldn't python3-pygments be in Recommends? (Maybe also in Build-Depends?)

I'd use "filter" rather than "findstring" in debian/rules.

Apart from these, the packaging looks good. I have some comments to the upstream part though:

CONFIGURATION_DIR = os.path.expanduser('~/.config/')

Could you make it support XDG Base Directory Specification[0] instead of hardcoding ~/.config? Thanks.

try:
	import markdown
except:
	return False

Make it s/except:/except ImportError:/. [1] (There are more instances of the same buglet in other files.)

orig_stylesheet = self.publish_parts(text)['stylesheet']
# Cut off <style> and </style> tags
return orig_stylesheet[25:-10] + get_pygments_stylesheet('.code')

Eww, magic numbers. Wouldn't it break horribly if the user disabled embed_stylesheet in their docutils.conf?

start_position = head.find('<script ')
end_position = head.rfind('</script>')
if start_position >= 0 and end_position >= 0:
	mjurl = head[start_position:end_position+9]+'\n'
	return mjurl.replace(MATHJAX_WEB_URL, get_mathjax_url(webenv))
return ''

Eww again. How about using regular expressions instead? :)


[0] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
[1] http://docs.python.org/3/howto/doanddont.html#except

--
Jakub Wilk


Reply to: