Browse Source

Merge remote-tracking branch 'upstream/master' into add-quarto-support

pull/200/head
J S 2 years ago
parent
commit
ca07357d63
  1. 4
      .github/workflows/ci.yml
  2. 10
      CHANGELOG.md
  3. 2
      Project.toml
  4. 562
      docs/Manifest.toml
  5. 6
      src/Literate.jl
  6. 11
      test/runtests.jl

4
.github/workflows/ci.yml

@ -27,7 +27,7 @@ jobs:
version: '1' version: '1'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1 - uses: julia-actions/setup-julia@v2
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- uses: actions/cache@v3 - uses: actions/cache@v3
@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1 - uses: julia-actions/setup-julia@v2
with: with:
version: '1' version: '1'
- uses: actions/cache@v3 - uses: actions/cache@v3

10
CHANGELOG.md

@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- ## [Unreleased] --> <!-- ## [Unreleased] -->
## [2.16.1] - 2024-01-04
### Fixed
- Fix removal of Documenter-style `@ref` links spanning multiple lines. ([#224][github-224],
[#233][github-2233])
## [2.16.0] - 2023-11-08 ## [2.16.0] - 2023-11-08
### Added ### Added
- "Soft" scoping rules (see e.g. https://github.com/JuliaLang/SoftGlobalScope.jl) are now - "Soft" scoping rules (see e.g. https://github.com/JuliaLang/SoftGlobalScope.jl) are now
@ -277,12 +282,15 @@ https://discourse.julialang.org/t/ann-literate-jl/10651 for release announcement
[github-221]: https://github.com/fredrikekre/Literate.jl/pull/221 [github-221]: https://github.com/fredrikekre/Literate.jl/pull/221
[github-222]: https://github.com/fredrikekre/Literate.jl/issues/222 [github-222]: https://github.com/fredrikekre/Literate.jl/issues/222
[github-223]: https://github.com/fredrikekre/Literate.jl/pull/223 [github-223]: https://github.com/fredrikekre/Literate.jl/pull/223
[github-224]: https://github.com/fredrikekre/Literate.jl/issues/224
[github-227]: https://github.com/fredrikekre/Literate.jl/issues/227 [github-227]: https://github.com/fredrikekre/Literate.jl/issues/227
[github-228]: https://github.com/fredrikekre/Literate.jl/issues/228 [github-228]: https://github.com/fredrikekre/Literate.jl/issues/228
[github-229]: https://github.com/fredrikekre/Literate.jl/pull/229 [github-229]: https://github.com/fredrikekre/Literate.jl/pull/229
[github-230]: https://github.com/fredrikekre/Literate.jl/pull/230 [github-230]: https://github.com/fredrikekre/Literate.jl/pull/230
[github-233]: https://github.com/fredrikekre/Literate.jl/pull/233
[Unreleased]: https://github.com/fredrikekre/Literate.jl/compare/v2.16.0...HEAD [Unreleased]: https://github.com/fredrikekre/Literate.jl/compare/v2.16.1...HEAD
[2.16.1]: https://github.com/fredrikekre/Literate.jl/compare/v2.16.0...v2.16.1
[2.16.0]: https://github.com/fredrikekre/Literate.jl/compare/v2.15.1...v2.16.0 [2.16.0]: https://github.com/fredrikekre/Literate.jl/compare/v2.15.1...v2.16.0
[2.15.1]: https://github.com/fredrikekre/Literate.jl/compare/v2.15.0...v2.15.1 [2.15.1]: https://github.com/fredrikekre/Literate.jl/compare/v2.15.0...v2.15.1
[2.15.0]: https://github.com/fredrikekre/Literate.jl/compare/v2.14.2...v2.15.0 [2.15.0]: https://github.com/fredrikekre/Literate.jl/compare/v2.14.2...v2.15.0

2
Project.toml

@ -1,6 +1,6 @@
name = "Literate" name = "Literate"
uuid = "98b081ad-f1c9-55d3-8b20-4c87d4299306" uuid = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
version = "2.16.0" version = "2.16.1"
[deps] [deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

562
docs/Manifest.toml

File diff suppressed because it is too large Load Diff

6
src/Literate.jl

@ -218,9 +218,9 @@ function replace_default(content, sym;
# Run some Documenter specific things # Run some Documenter specific things
if !isdocumenter(config) if !isdocumenter(config)
## - remove documenter style `@ref`s and `@id`s ## - remove documenter style `@ref`s and `@id`s
push!(repls, r"\[(.*?)\]\(@ref\)" => s"\1") # [foo](@ref) => foo push!(repls, r"\[([^]]+?)\]\(@ref\)"s => s"\1") # [foo](@ref) => foo
push!(repls, r"\[(.*?)\]\(@ref .*?\)" => s"\1") # [foo](@ref bar) => foo push!(repls, r"\[([^]]+?)\]\(@ref .*?\)"s => s"\1") # [foo](@ref bar) => foo
push!(repls, r"\[(.*?)\]\(@id .*?\)" => s"\1") # [foo](@id bar) => foo push!(repls, r"\[([^]]+?)\]\(@id .*?\)"s => s"\1") # [foo](@id bar) => foo
end end
# do the replacements # do the replacements

11
test/runtests.jl

@ -310,6 +310,9 @@ content = """
#nb # %% [markdown] {"meta": "data"} #nb # %% [markdown] {"meta": "data"}
#nb # # Explicit markdown cell with metadata #nb # # Explicit markdown cell with metadata
# It can sometimes happen that a text editor line-wraps [a link which shouldn't
# break](@ref bbaarr)
#= #=
First multiline First multiline
comment comment
@ -489,6 +492,11 @@ const GITLAB_ENV = Dict(
@test occursin("# \\int f(x) dx", script) @test occursin("# \\int f(x) dx", script)
@test occursin("# First multiline", script) @test occursin("# First multiline", script)
@test occursin("# Second multiline comment", script) @test occursin("# Second multiline comment", script)
@test occursin(
"""
# It can sometimes happen that a text editor line-wraps a link which shouldn't
# break""",
script)
# mdstrings # mdstrings
mdstrings_file = "inputfile_mdstrings.jl" mdstrings_file = "inputfile_mdstrings.jl"
@ -679,6 +687,9 @@ end end
hidden2 * hidden2 hidden2 * hidden2
```` ````
It can sometimes happen that a text editor line-wraps [a link which shouldn't
break](@ref bbaarr)
First multiline First multiline
comment comment

Loading…
Cancel
Save