Skip to content

Commit

Permalink
Ensure empty Str has same height as non-empty (#2981)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 7, 2021
1 parent 2089ce2 commit 0869066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions panel/pane/markup.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def applies(cls, obj):

def _get_properties(self):
properties = super()._get_properties()
if self.object is None:
text = ''
if self.object is None or (isinstance(self.object, str) and self.object == ''):
text = '<pre> </pre>'
else:
text = '<pre>'+str(self.object)+'</pre>'
return dict(properties, text=escape(text))
Expand Down

0 comments on commit 0869066

Please sign in to comment.