Skip to content

Commit

Permalink
Improved label for bibliography nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Oct 8, 2019
1 parent e9232f9 commit cb6bf28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/macrogen/uris.py
Expand Up @@ -80,8 +80,11 @@ def label(self) -> str:
elif self.uri.startswith('faust://document'):
kind, sigil = self.uri.split('/')[-2:]
return f"{kind}: {sigil}"
else:
return self.uri
elif self.uri.startswith('faust://bibliography'):
bibentry = config.bibliography.get(self.uri)
if bibentry:
return bibentry.citation
return self.uri

def sort_tuple(self):
"""
Expand Down

0 comments on commit cb6bf28

Please sign in to comment.