Skip to content

Commit

Permalink
Make the info tooltip white-space: pre-line
Browse files Browse the repository at this point in the history
FIX: Style the info element so that newlines are preserved, to make it easier
to display multi-line info from a string source.

See https://discuss.codemirror.net/t/render-autocompletes-info-outside-of-editor/8511/3
  • Loading branch information
marijnh committed Aug 5, 2024
1 parent a6ba03d commit 5392819
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export const baseTheme = EditorView.baseTheme({
padding: "3px 9px",
width: "max-content",
maxWidth: `${Info.Width}px`,
boxSizing: "border-box"
boxSizing: "border-box",
whiteSpace: "pre-line"
},

".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
Expand Down

0 comments on commit 5392819

Please sign in to comment.