mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Move assets/data to library/assets (#1515)
So these assets lives inside the typst-library crate and doesn't break `cargo vendor`
This commit is contained in:
parent
57d4b8b751
commit
c0c03812d0
2
NOTICE
2
NOTICE
@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
================================================================================
|
||||
|
||||
================================================================================
|
||||
Syntaxes in `assets/data/syntect.bin` are generated from syntax definitions
|
||||
Syntaxes in `library/assets/syntect.bin` are generated from syntax definitions
|
||||
which can be found here:
|
||||
https://github.com/sharkdp/bat/tree/master/assets/syntaxes
|
||||
|
||||
|
@ -1016,23 +1016,23 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec<L
|
||||
///
|
||||
/// ```sh
|
||||
/// icu4x-datagen --locales full --keys-for-bin target/debug/typst \
|
||||
/// --format blob --out assets/data/icudata.postcard --overwrite
|
||||
/// --format blob --out library/assets/icudata.postcard --overwrite
|
||||
/// ```
|
||||
///
|
||||
/// Install icu4x-datagen with `cargo install icu4x-datagen`.
|
||||
static ICU_DATA: &[u8] = include_bytes!("../../../assets/data/icudata.postcard");
|
||||
static ICU_DATA: &[u8] = include_bytes!("../../assets/icudata.postcard");
|
||||
|
||||
/// Generated by the following command:
|
||||
///
|
||||
/// ```sh
|
||||
/// icu4x-datagen --locales zh ja --keys segmenter/line@1 --format blob \
|
||||
/// --out assets/data/cj_linebreak_data.postcard --overwrite
|
||||
/// --out library/assets/cj_linebreak_data.postcard --overwrite
|
||||
/// ```
|
||||
///
|
||||
/// The used icu4x-datagen should be patched by
|
||||
/// https://github.com/peng1999/icu4x/commit/b9beb6cbf633d61fc3d7983e5baf7f4449fbfae5
|
||||
static CJ_LINEBREAK_DATA: &[u8] =
|
||||
include_bytes!("../../../assets/data/cj_linebreak_data.postcard");
|
||||
include_bytes!("../../assets/cj_linebreak_data.postcard");
|
||||
|
||||
/// The general line break segmenter.
|
||||
static SEGMENTER: Lazy<LineSegmenter> = Lazy::new(|| {
|
||||
|
@ -343,9 +343,8 @@ fn to_syn(RgbaColor { r, g, b, a }: RgbaColor) -> synt::Color {
|
||||
/// syntaxes/02_Extra/VimHelp.sublime-syntax
|
||||
/// syntaxes/02_Extra/cmd-help/syntaxes/cmd-help.sublime-syntax
|
||||
/// ```
|
||||
static SYNTAXES: Lazy<syntect::parsing::SyntaxSet> = Lazy::new(|| {
|
||||
syntect::dumps::from_binary(include_bytes!("../../../assets/data/syntect.bin"))
|
||||
});
|
||||
static SYNTAXES: Lazy<syntect::parsing::SyntaxSet> =
|
||||
Lazy::new(|| syntect::dumps::from_binary(include_bytes!("../../assets/syntect.bin")));
|
||||
|
||||
/// The default theme used for syntax highlighting.
|
||||
pub static THEME: Lazy<synt::Theme> = Lazy::new(|| synt::Theme {
|
||||
|
Loading…
x
Reference in New Issue
Block a user