~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/macro/FootNote.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    @license: GNU GPL, see COPYING for details.
12
12
"""
13
13
 
 
14
import sha
 
15
 
14
16
from MoinMoin import config, wikiutil
15
17
from MoinMoin.parser.text_moin_wiki import Parser as WikiParser
16
 
from MoinMoin.support.python_compatibility import hash_new
17
18
 
18
19
Dependencies = ["time"] # footnote macro cannot be cached
19
20
 
34
35
        idx = request.footnote_ctr
35
36
        request.footnote_ctr += 1
36
37
 
37
 
        shahex = hash_new('sha1', args.encode(config.charset)).hexdigest()
 
38
        shahex = sha.new(args.encode(config.charset)).hexdigest()
38
39
        backlink_id = "fndef-%s-%d" % (shahex, idx)
39
40
        fwdlink_id = "fnref-%s" % shahex
40
41