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:
figsoda 2023-06-20 12:11:20 -04:00 committed by GitHub
parent 57d4b8b751
commit c0c03812d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 8 deletions

2
NOTICE
View File

@ -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: which can be found here:
https://github.com/sharkdp/bat/tree/master/assets/syntaxes https://github.com/sharkdp/bat/tree/master/assets/syntaxes

View File

@ -1016,23 +1016,23 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec<L
/// ///
/// ```sh /// ```sh
/// icu4x-datagen --locales full --keys-for-bin target/debug/typst \ /// 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`. /// 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: /// Generated by the following command:
/// ///
/// ```sh /// ```sh
/// icu4x-datagen --locales zh ja --keys segmenter/line@1 --format blob \ /// 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 /// The used icu4x-datagen should be patched by
/// https://github.com/peng1999/icu4x/commit/b9beb6cbf633d61fc3d7983e5baf7f4449fbfae5 /// https://github.com/peng1999/icu4x/commit/b9beb6cbf633d61fc3d7983e5baf7f4449fbfae5
static CJ_LINEBREAK_DATA: &[u8] = 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. /// The general line break segmenter.
static SEGMENTER: Lazy<LineSegmenter> = Lazy::new(|| { static SEGMENTER: Lazy<LineSegmenter> = Lazy::new(|| {

View File

@ -343,9 +343,8 @@ fn to_syn(RgbaColor { r, g, b, a }: RgbaColor) -> synt::Color {
/// syntaxes/02_Extra/VimHelp.sublime-syntax /// syntaxes/02_Extra/VimHelp.sublime-syntax
/// syntaxes/02_Extra/cmd-help/syntaxes/cmd-help.sublime-syntax /// syntaxes/02_Extra/cmd-help/syntaxes/cmd-help.sublime-syntax
/// ``` /// ```
static SYNTAXES: Lazy<syntect::parsing::SyntaxSet> = Lazy::new(|| { static SYNTAXES: Lazy<syntect::parsing::SyntaxSet> =
syntect::dumps::from_binary(include_bytes!("../../../assets/data/syntect.bin")) Lazy::new(|| syntect::dumps::from_binary(include_bytes!("../../assets/syntect.bin")));
});
/// The default theme used for syntax highlighting. /// The default theme used for syntax highlighting.
pub static THEME: Lazy<synt::Theme> = Lazy::new(|| synt::Theme { pub static THEME: Lazy<synt::Theme> = Lazy::new(|| synt::Theme {