diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2020-08-13 10:31:04 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2020-08-13 10:31:04 +0800 |
commit | b7f7164e5f617673aa89a37fd3f7ec3359e360a6 (patch) | |
tree | d14bb5ceb36a28f370bdc7c8ee9d9b4bcab4074f /app | |
parent | b08075b4c3bbd9f4c13c4540dcb3b4e1b6dceb37 (diff) |
main.py: each word has a separate line such that it is easy to print and make notes after it.
Diffstat (limited to 'app')
-rw-r--r-- | app/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/main.py b/app/main.py index fc9caa1..56ab992 100644 --- a/app/main.py +++ b/app/main.py @@ -306,9 +306,9 @@ def userpage(username): freq = x[1]
if isinstance(d[word], list): # d[word] is a list of dates
if freq > 1:
- page += '<a href="%s">%s</a> (<a title="%s">%d</a>)\n' % (youdao_link(word), word, '; '.join(d[word]), freq)
+ page += '<p><a href="%s">%s</a> (<a title="%s">%d</a>)</p>\n' % (youdao_link(word), word, '; '.join(d[word]), freq)
else:
- page += '<a href="%s">%s</a> <font color="white">(<a title="%s">%d</a>)</a>\n' % (youdao_link(word), word, '; '.join(d[word]), freq)
+ page += '<p><a href="%s">%s</a> <font color="white">(<a title="%s">%d</a>)</a></p>\n' % (youdao_link(word), word, '; '.join(d[word]), freq)
elif isinstance(d[word], int): # d[word] is a frequency. to migrate from old format.
page += '<a href="%s">%s</a>%d\n' % (youdao_link(word), word, freq)
|