Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f243be19e7c0
Choose a base ref
...
head repository: getnikola/plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c32ee5c84686
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 9, 2016

  1. Copy the full SHA
    7170bf5 View commit details
  2. Copy the full SHA
    c32ee5c View commit details
Showing with 7 additions and 7 deletions.
  1. +4 −4 tests/test_publication_list.py
  2. +1 −1 v7/publication_list/README.md
  3. +2 −2 v7/publication_list/publication_list.py
8 changes: 4 additions & 4 deletions tests/test_publication_list.py
Original file line number Diff line number Diff line change
@@ -29,12 +29,12 @@ def tearDownClass():
def test_default(self):
# the result should be
expected = (
'<div class = "publication-list">'
'<div class="publication-list">'
'<h3>2015</h3><ul>'
'<li class = "publication">.*One article in 2015.*<a href="https://example.com/bibtex/a2015.bib">BibTeX</a>.*<a href="/pdf/a2015.pdf">full text</a>.*<a href="https://example.com/papers/a2015.html">abstract and details</a>.*</li>'
'<li class = "publication">.*One conference in 2015.*<a href="https://example.com/bibtex/p2015.bib">BibTeX</a>.*<a href="https://example.com/papers/p2015.html">abstract and details</a>.*</li>'
'<li class="publication">.*One article in 2015.*<a href="https://example.com/bibtex/a2015.bib">BibTeX</a>.*<a href="/pdf/a2015.pdf">full text</a>.*<a href="https://example.com/papers/a2015.html">abstract and details</a>.*</li>'
'<li class="publication">.*One conference in 2015.*<a href="https://example.com/bibtex/p2015.bib">BibTeX</a>.*<a href="https://example.com/papers/p2015.html">abstract and details</a>.*</li>'
'</ul><h3>2010</h3><ul>'
'<li class = "publication">.*One Book in 2010.*<a href="https://example.com/bibtex/b2010.bib">BibTeX</a>.*<a href="http://example.org/b2010.pdf">full text</a>.*<a href="https://example.com/papers/b2010.html">abstract and details</a>.*</li>'
'<li class="publication">.*One Book in 2010.*<a href="https://example.com/bibtex/b2010.bib">BibTeX</a>.*<a href="http://example.org/b2010.pdf">full text</a>.*<a href="https://example.com/papers/b2010.html">abstract and details</a>.*</li>'
'</ul></div>'
)
self.sample = '.. publication_list:: tests/data/publication_list/test.bib\n\t:highlight_author: Nikola Tesla'
2 changes: 1 addition & 1 deletion v7/publication_list/README.md
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ where `my-publications.bib` contains:
year = 2015,
journal = {Great Journal},
volume = 1,
page = {1--10},
pages = {1--10},
fulltext = {/pdf/a2015.pdf}
}

4 changes: 2 additions & 2 deletions v7/publication_list/publication_list.py
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ def run(self):
key=lambda e: e[1].fields['year'], reverse=True)

print(type(data))
html = '<div class = "publication-list">\n'
html = '<div class="publication-list">\n'
cur_year = None

if bibtex_dir: # create the bibtex dir if the option is set
@@ -114,7 +114,7 @@ def run(self):
if highlight_author: # highlight an author (usually oneself)
pub_html = pub_html.replace(highlight_author,
'<strong>{}</strong>'.format(highlight_author), 1)
html += '<li class = "publication">' + pub_html
html += '<li class="publication">' + pub_html

extra_links = ""
bib_data = BibliographyData(dict({label: entry})) # detail_page_dir may need it later