diff --git a/NEWS.md b/NEWS.md index fb6d79ec788363..b96cb3dfd13b74 100644 --- a/NEWS.md +++ b/NEWS.md @@ -67,6 +67,12 @@ Standard library changes * The new `@styled_str` string macro provides a convenient way of creating a `AnnotatedString` with various faces or other attributes applied. +#### JuliaSyntaxHighlighting + +* A new standard library for applying syntax highlighting to Julia code, this + uses `JuliaSyntax` and `StyledStrings` to implement a `highlight` function + that creates an `AnnotatedString` with syntax highlighting applied. + #### Package Manager #### LinearAlgebra diff --git a/deps/checksums/JuliaSyntaxHighlighting-d0ea83439db25b837b836822d9cdece6b9cc5fbf.tar.gz/md5 b/deps/checksums/JuliaSyntaxHighlighting-d0ea83439db25b837b836822d9cdece6b9cc5fbf.tar.gz/md5 new file mode 100644 index 00000000000000..2da761ef3a8e60 --- /dev/null +++ b/deps/checksums/JuliaSyntaxHighlighting-d0ea83439db25b837b836822d9cdece6b9cc5fbf.tar.gz/md5 @@ -0,0 +1 @@ +591172b4514117ce311436d25304944d diff --git a/deps/checksums/JuliaSyntaxHighlighting-d0ea83439db25b837b836822d9cdece6b9cc5fbf.tar.gz/sha512 b/deps/checksums/JuliaSyntaxHighlighting-d0ea83439db25b837b836822d9cdece6b9cc5fbf.tar.gz/sha512 new file mode 100644 index 00000000000000..a11d93f578b1a5 --- /dev/null +++ b/deps/checksums/JuliaSyntaxHighlighting-d0ea83439db25b837b836822d9cdece6b9cc5fbf.tar.gz/sha512 @@ -0,0 +1 @@ +41a28a8ab4439b3091de6f248d9276bae636f7c695f1a0513d4e0f00eb22623ba970864457e06e12a88edd6443eef2aea2144b626be2e080bc1e5fc7001d891b diff --git a/pkgimage.mk b/pkgimage.mk index 0b46531cfa137f..6c01bf26c1e5a3 100644 --- a/pkgimage.mk +++ b/pkgimage.mk @@ -92,6 +92,7 @@ $(eval $(call stdlib_builder,Printf,Unicode)) $(eval $(call stdlib_builder,Random,SHA)) $(eval $(call stdlib_builder,Tar,ArgTools,SHA)) $(eval $(call stdlib_builder,DelimitedFiles,Mmap)) +$(eval $(call stdlib_builder,JuliaSyntaxHighlighting,)) # 2-depth packages $(eval $(call stdlib_builder,LLD_jll,Zlib_jll libLLVM_jll Artifacts Libdl)) diff --git a/stdlib/.gitignore b/stdlib/.gitignore index ce744aa43d9f54..93668857189af2 100644 --- a/stdlib/.gitignore +++ b/stdlib/.gitignore @@ -27,6 +27,8 @@ /Distributed /StyledStrings-* /StyledStrings +/JuliaSyntaxHighlighting-* +/JuliaSyntaxHighlighting /*_jll/StdlibArtifacts.toml /*/Manifest.toml /*.image diff --git a/stdlib/JuliaSyntaxHighlighting.version b/stdlib/JuliaSyntaxHighlighting.version new file mode 100644 index 00000000000000..28a364335b4c79 --- /dev/null +++ b/stdlib/JuliaSyntaxHighlighting.version @@ -0,0 +1,4 @@ +JULIASYNTAXHIGHLIGHTING_BRANCH = main +JULIASYNTAXHIGHLIGHTING_SHA1 = d0ea83439db25b837b836822d9cdece6b9cc5fbf +JULIASYNTAXHIGHLIGHTING_GIT_URL := https://github.com/tecosaur/JuliaSyntaxHighlighting.jl.git +JULIASYNTAXHIGHLIGHTING_TAR_URL = https://api.github.com/repos/tecosaur/JuliaSyntaxHighlighting.jl/tarball/$1 diff --git a/stdlib/Makefile b/stdlib/Makefile index 1c8a2849d75f1e..ebc40c9db2b12a 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -47,7 +47,8 @@ STDLIBS = Artifacts Base64 CRC32c Dates FileWatching \ $(JLL_NAMES) STDLIBS_EXT = Pkg Statistics LazyArtifacts LibCURL DelimitedFiles Downloads ArgTools \ - Tar NetworkOptions SuiteSparse SparseArrays StyledStrings SHA Distributed + Tar NetworkOptions SuiteSparse SparseArrays StyledStrings SHA Distributed \ + JuliaSyntaxHighlighting $(foreach module, $(STDLIBS_EXT), $(eval $(call stdlib-external,$(module),$(shell echo $(module) | tr a-z A-Z)))) diff --git a/stdlib/stdlib.mk b/stdlib/stdlib.mk index 696b24a8f8bf1c..eeb0e085c8790a 100644 --- a/stdlib/stdlib.mk +++ b/stdlib/stdlib.mk @@ -4,9 +4,9 @@ STDLIBS_WITHIN_SYSIMG := \ INDEPENDENT_STDLIBS := \ ArgTools Base64 CRC32c Dates DelimitedFiles Distributed Downloads Future \ - InteractiveUtils LazyArtifacts LibGit2 LibCURL Logging Markdown Mmap \ - NetworkOptions Profile Printf Pkg REPL Serialization SharedArrays SparseArrays \ - Statistics StyledStrings Tar Test TOML Unicode UUIDs \ + InteractiveUtils JuliaSyntaxHighlighting LazyArtifacts LibGit2 LibCURL Logging \ + Markdown Mmap NetworkOptions Profile Printf Pkg REPL Serialization SharedArrays \ + SparseArrays Statistics StyledStrings Tar Test TOML Unicode UUIDs \ dSFMT_jll GMP_jll libLLVM_jll LLD_jll LLVMLibUnwind_jll LibUnwind_jll LibUV_jll \ LibCURL_jll LibSSH2_jll LibGit2_jll nghttp2_jll MozillaCACerts_jll MbedTLS_jll \ MPFR_jll OpenLibm_jll PCRE2_jll p7zip_jll Zlib_jll