Skip to content

Commit

Permalink
fix(app): Fix whitespace in language rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Sep 3, 2022
1 parent bd27a4d commit 43e577a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ancv/visualization/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,12 @@ def _(item: Publication, theme: Theme) -> RenderableGenerator:
@format.register
@staticmethod
def _(item: Language, theme: Theme) -> RenderableGenerator:
if (language := item.language) is not None:
yield Text.assemble(
(language, theme.emphasis[0]),
" ",
(item.fluency or "", theme.emphasis[1]),
)
if language := item.language:
yield Text(language, style=theme.emphasis[0])
if fluency := item.fluency:
yield NewLine()
yield indent(Text(fluency, style=theme.emphasis[1]))
yield NewLine()

@format.register
@staticmethod
Expand All @@ -432,6 +432,7 @@ def _(item: Interest, theme: Theme) -> RenderableGenerator:
if name := item.name:
yield Text(name, style=theme.emphasis[0])
if keywords := item.keywords:
yield NewLine()
yield indent(Text(", ".join(keywords), style=theme.emphasis[1]))
yield NewLine()

Expand Down

0 comments on commit 43e577a

Please sign in to comment.