Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: table column width calculation with latex markup #11225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion deps/shui/src/logseq/shui/table/v2.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@
(get-in opts [:dynamic-widths col-index]))]
;; Whenever the cell changes, we need to calculate new bounds for the given content
;; -innerText is used here to strip out formatting, this may turn out to not work for all given block types
(rum/use-layout-effect! #(->> (.. cell-ref -current -innerText)
(rum/use-layout-effect! #(->> (-> (.. cell-ref -current -innerText)
(str/replace #"\\[^\s]+" " "))
(count)
(handle-cell-width-change col-index))
[cell])
Expand Down