diff --git a/pubs/pretty.py b/pubs/pretty.py index 10de342..226a11e 100644 --- a/pubs/pretty.py +++ b/pubs/pretty.py @@ -69,8 +69,8 @@ def paper_oneliner(p, citekey_only=False): if p.docpath is not None: doc_str = color.dye_out(' [{}]'.format(os.path.splitext(p.docpath)[1][1:]), 'tag') - tags = '' if len(p.tags) == 0 else ' | {}'.format( + tags = '' if len(p.tags) == 0 else '| {}'.format( ','.join(color.dye_out(t, 'tag') for t in sorted(p.tags))) - return '[{citekey}] {descr}{doc}{tags}'.format( + return '[{citekey}] {descr}{doc} {tags}'.format( citekey=color.dye_out(p.citekey, 'citekey'), descr=bibdesc, tags=tags, doc=doc_str) diff --git a/tests/test_usecase.py b/tests/test_usecase.py index 43083cd..3654985 100644 --- a/tests/test_usecase.py +++ b/tests/test_usecase.py @@ -669,12 +669,12 @@ class TestUsecase(DataCommandTestCase): correct = ['Initializing pubs in /paper_first\n', 'added to pubs:\n[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n' 'data/pagerank.pdf was copied to the pubs repository.\n', - '[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n', + '[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) [pdf] \n', '\n', '', 'network search\n', 'info: Assuming search to be a tag.\n' - '[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) | network,search\n', + '[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) [pdf] | network,search\n', ] cmds = ['pubs init -p /paper_first',