Skip to content

Commit

Permalink
Tune HTML views for message and schema.
Browse files Browse the repository at this point in the history
1) Message to use normal font size.
2) Schema to escape characters in HTML.

PiperOrigin-RevId: 704808683
  • Loading branch information
daiyip authored and langfun authors committed Dec 10, 2024
1 parent 3ef007a commit e668f7f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion langfun/core/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,6 @@ def _html_tree_view_css_styles(cls) -> list[str]:
padding: 20px;
margin: 10px 5px 10px 5px;
font-style: italic;
font-size: 1.1em;
white-space: pre-wrap;
border: 1px solid #EEE;
border-radius: 5px;
Expand Down
1 change: 0 additions & 1 deletion langfun/core/message_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ def test_html_style(self):
padding: 20px;
margin: 10px 5px 10px 5px;
font-style: italic;
font-size: 1.1em;
white-space: pre-wrap;
border: 1px solid #EEE;
border-radius: 5px;
Expand Down
2 changes: 1 addition & 1 deletion langfun/core/structured/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _html_tree_view_content(
):
return pg.Html.element(
'div',
[self.schema_str(protocol='python')],
[pg.Html.escape(self.schema_str(protocol='python'))],
css_classes=['lf-schema-definition']
).add_style(
"""
Expand Down

0 comments on commit e668f7f

Please sign in to comment.