mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
Merge pull request #1093 from jonathandturner/fix_asset
Try to fix asset building
This commit is contained in:
commit
f52235b1c1
BIN
crates/nu_plugin_textview/src/assets/syntaxes.bin
Normal file
BIN
crates/nu_plugin_textview/src/assets/syntaxes.bin
Normal file
Binary file not shown.
BIN
crates/nu_plugin_textview/src/assets/themes.bin
Normal file
BIN
crates/nu_plugin_textview/src/assets/themes.bin
Normal file
Binary file not shown.
@ -254,14 +254,12 @@ fn view_text_value(value: &Value) {
|
||||
match extension {
|
||||
Some(extension) => {
|
||||
// Load these once at the start of your program
|
||||
let ps: SyntaxSet = syntect::dumps::from_binary(include_bytes!(
|
||||
"../../../assets/syntaxes.bin"
|
||||
));
|
||||
let ps: SyntaxSet =
|
||||
syntect::dumps::from_binary(include_bytes!("assets/syntaxes.bin"));
|
||||
|
||||
if let Some(syntax) = ps.find_syntax_by_extension(&extension) {
|
||||
let ts: ThemeSet = syntect::dumps::from_binary(include_bytes!(
|
||||
"../../../assets/themes.bin"
|
||||
));
|
||||
let ts: ThemeSet =
|
||||
syntect::dumps::from_binary(include_bytes!("assets/themes.bin"));
|
||||
let mut h = HighlightLines::new(syntax, &ts.themes["OneHalfDark"]);
|
||||
|
||||
let mut v = vec![];
|
||||
|
Loading…
Reference in New Issue
Block a user