8000 TeX on Markup widgets Div, Paragraph by IuryPiva · Pull Request #11585 · bokeh/bokeh · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2bcffb9
TeX working on div widgets
IuryPiva Sep 10, 2021
d6a2328
add missing inline prop to bokeh
IuryPiva Sep 11, 2021
3b073f2
baselins for tex on div
IuryPiva Sep 11, 2021
2ab38cc
check for property exist instead of getting all property values
IuryPiva Sep 11, 2021
f266a8c
restore default options
IuryPiva Sep 11, 2021
936e05f
use mathjax namespace
IuryPiva Sep 11, 2021
c7bd719
export mathjax provider
IuryPiva Sep 11, 2021
ec53f89
update div imports
IuryPiva Sep 11, 2021
277257b
remove log and unnecessary filter
IuryPiva Sep 11, 2021
678cfe1
update mathjax namespace
IuryPiva Sep 11, 2021
d5308dd
update find math function
IuryPiva Sep 11, 2021
cf6a318
unit tests find_math_parts
IuryPiva Sep 11, 2021
a24d884
update docstrings
IuryPiva Sep 11, 2021
6205be8
check for mathstrings by default; have a disable flag
IuryPiva Sep 11, 2021
22b09b2
update markups to accept tex
IuryPiva Sep 11, 2021
1f1a55b
update import order
IuryPiva Sep 11, 2021
146c6a4
update baselines
IuryPiva Sep 11, 2021
1689425
remove outdated baselines
IuryPiva Sep 11, 2021
cef673a
change is_tex_string to contains_tex_string
IuryPiva Sep 11, 2021
0f75ec5
give latex tests some threshold
IuryPiva Sep 11, 2021
b40b20d
threshold fix
IuryPiva Sep 11, 2021
f9e94c3
fix wrong style on paragraph
IuryPiva Sep 11, 2021
64eaae9
remove needless thresholds
IuryPiva Sep 11, 2021
42972b3
removed tex support from pre
IuryPiva Sep 11, 2021
88d8eb5
Merge branch 'branch-2.4' into iurypiva/mathtext-on-div-widget
IuryPiva Sep 11, 2021
d87fe63
Fix typo
IuryPiva Sep 11, 2021
c6384df
smaller sample text for pre test not latex
IuryPiva Sep 11, 2021
b71ca9b
update pre baselines
IuryPiva Sep 11, 2021
8fe2742
use doublequotes
IuryPiva Sep 11, 2021
5ffd54c
snake case
IuryPiva Sep 12, 2021
28cffab
remove random whitespace
IuryPiva Sep 12, 2021
50fee9d
update docstrings
IuryPiva Sep 12, 2021
f27068a
replace find math with regexs and mathjax implementation
IuryPiva Sep 13, 2021
227aa05
move processing of tex to views
IuryPiva Sep 13, 2021
0557249
output which tests has caused errors
IuryPiva Sep 13, 2021
9ac23e8
update contains_tex check
IuryPiva Sep 13, 2021
abcf63e
check if parts are undefined
IuryPiva Sep 13, 2021
9398619
update docstrings
IuryPiva Sep 13, 2021
4966a6a
add line between tests
IuryPiva Sep 13, 2021
d2e590f
remove test description
IuryPiva Sep 13, 2021
47f26af
rename find_math to find_tex
IuryPiva Sep 13, 2021
19099b2
remove todo warning
IuryPiva Sep 13, 2021
d440f03
remove needless regex flag
IuryPiva Sep 13, 2021
85769d5
update provider interaction
IuryPiva Sep 13, 2021
caf6540
make code consistent with other markups
IuryPiva Sep 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
snake case
  • Loading branch information
IuryPiva committed Sep 12, 2021
commit 5ffd54cf8ab28feb0cbf759b85b66aaf7ef2b19c
8 changes: 4 additions & 4 deletions bokehjs/src/lib/models/text/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Delimiter = {
start: string
end: string
inline: boolean
nextIndex?: number
next_index?: number
}

export function find_math_parts(mathstring: string): (PlainText | TeX)[] {
Expand All @@ -25,12 +25,12 @@ export function find_math_parts(mathstring: string): (PlainText | TeX)[] {
// get their position on text
.map((delimiter) => ({
...delimiter,
nextIndex: text.indexOf(delimiter.start),
next_index: text.indexOf(delimiter.start),
}))
// remove delimiters not found
.filter((delimiter) => delimiter.nextIndex >= 0)
.filter((delimiter) => delimiter.next_index >= 0)
// return the delimiter closer to start of text
.sort((a, b) => a.nextIndex - b.nextIndex)[0]
.sort((a, b) => a.next_index - b.next_index)[0]

const find_end = (text: string, delimiter?: Delimiter): string => {
// if there is no delimiter then the whole text is a plain string
Expand Down
0