Skip to content

Commit

Permalink
Merge branch 'master' into checkdocs-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi committed Jan 25, 2024
2 parents 9d8f888 + fd8155d commit 2a6d580
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: PDFs
path: test/examples/builds/*/*.pdf
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
DOCUMENTER_LATEX_DEBUG: ${{ github.workspace }}/latex-debug-logs
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ always() && matrix.format == 'pdf' }}
with:
name: PDF build logs
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
include:
- package: 'DocumenterCitations'
- package: 'DocumenterMermaid'
- package: 'Asciicast'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/cache@v3
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/cache@v3
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand All @@ -60,7 +61,7 @@ jobs:
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
${{ runner.os }}-
- name: install-and-build-documentation
shell: julia --color=yes {0}
run: |
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

* The search in the HTML output is now case-insensitive. ([#2373], [#2374])
* The search in the HTML output now prioritizes prefix matches. ([#2203], [#2375])

### Fixed

* Fix search filter toggle button styling in the HTML output. ([#2406], [#2408])

## Version [v1.2.1] - 2023-12-02

### Fixed
Expand Down Expand Up @@ -1721,6 +1732,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#2191]: https://github.com/JuliaDocs/Documenter.jl/issues/2191
[#2194]: https://github.com/JuliaDocs/Documenter.jl/issues/2194
[#2202]: https://github.com/JuliaDocs/Documenter.jl/issues/2202
[#2203]: https://github.com/JuliaDocs/Documenter.jl/issues/2203
[#2205]: https://github.com/JuliaDocs/Documenter.jl/issues/2205
[#2211]: https://github.com/JuliaDocs/Documenter.jl/issues/2211
[#2213]: https://github.com/JuliaDocs/Documenter.jl/issues/2213
Expand Down Expand Up @@ -1765,6 +1777,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#2348]: https://github.com/JuliaDocs/Documenter.jl/issues/2348
[#2364]: https://github.com/JuliaDocs/Documenter.jl/issues/2364
[#2365]: https://github.com/JuliaDocs/Documenter.jl/issues/2365
[#2373]: https://github.com/JuliaDocs/Documenter.jl/issues/2373
[#2374]: https://github.com/JuliaDocs/Documenter.jl/issues/2374
[#2375]: https://github.com/JuliaDocs/Documenter.jl/issues/2375
[#2406]: https://github.com/JuliaDocs/Documenter.jl/issues/2406
[#2408]: https://github.com/JuliaDocs/Documenter.jl/issues/2408
[JuliaLang/julia#36953]: https://github.com/JuliaLang/julia/issues/36953
[JuliaLang/julia#38054]: https://github.com/JuliaLang/julia/issues/38054
[JuliaLang/julia#39841]: https://github.com/JuliaLang/julia/issues/39841
Expand Down
11 changes: 8 additions & 3 deletions assets/html/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ let index = new minisearch({
word = word
.replace(/^[^a-zA-Z0-9@!]+/, "")
.replace(/[^a-zA-Z0-9@!]+$/, "");

word = word.toLowerCase();
}

return word ?? null;
Expand All @@ -141,6 +143,7 @@ let index = new minisearch({
tokenize: (string) => string.split(/[\s\-\.]+/),
// options which will be applied during the search
searchOptions: {
prefix: true,
boost: { title: 100 },
fuzzy: 2,
processTerm: (term) => {
Expand All @@ -149,6 +152,8 @@ let index = new minisearch({
word = word
.replace(/^[^a-zA-Z0-9@!]+/, "")
.replace(/[^a-zA-Z0-9@!]+$/, "");

word = word.toLowerCase();
}

return word ?? null;
Expand Down Expand Up @@ -322,7 +327,7 @@ function make_search_result(result, querystring) {
display_link += ` (${result.page})`;
}

let textindex = new RegExp(`\\b${querystring}\\b`, "i").exec(result.text);
let textindex = new RegExp(`${querystring}`, "i").exec(result.text);
let text =
textindex !== null
? result.text.slice(
Expand All @@ -337,8 +342,8 @@ function make_search_result(result, querystring) {
let display_result = text.length
? "..." +
text.replace(
new RegExp(`\\b${querystring}\\b`, "i"), // For first occurrence
'<span class="search-result-highlight p-1">$&</span>'
new RegExp(`${querystring}`, "i"), // For first occurrence
'<span class="search-result-highlight py-1">$&</span>'
) +
"..."
: ""; // highlights the match
Expand Down
27 changes: 8 additions & 19 deletions assets/html/scss/documenter-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,52 +132,41 @@ html.theme--#{$themename} {
border-radius: 0.7em;
transition: all 300ms;
}

.search-result-link:hover, .search-result-link:focus {
background-color: rgba(0, 128, 128, 0.1);
}

.search-result-link .property-search-result-badge {
transition: all 300ms;
}

.search-result-link:hover .property-search-result-badge, .search-result-link:focus .property-search-result-badge {
color: #333 !important;
background-color: #f1f5f9 !important;
}

.property-search-result-badge {
padding: 0.15em 0.5em;
font-size: 0.8em;
font-style: italic;
text-transform: none !important;
line-height: 1.5;
color: whitesmoke;
background-color: #33415580;
border-radius: 0.6rem;
}


.search-result-title {
color: whitesmoke;
}

.search-result-highlight {
background-color: greenyellow;
color: black;
}

.search-divider {
border-bottom: 1px solid #5e6d6f50
}

.w-100 {
width: 100%;
}

.gap-2 {
gap: 0.5rem;
}

.gap-4 {
gap: 1rem;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/html/themes/documenter-dark.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/src/checklists.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ In preparation for a release, use the following checklist. These steps should be
- [ ] Update `CHANGELOG.md`, following the existing style (in particular, make sure that the change log for this version has the correct version number and date).
- [ ] Run `make changelog`, to make sure that all the issue references in `CHANGELOG.md` are up to date.
- [ ] Check that the commit messages in this PR do not contain `[ci skip]`
- [ ] Run https://github.com/JuliaDocs/Documenter.jl/actions/workflows/regression-tests.yml
using a `workflow_dispatch` trigger to check for any changes that broke extensions.
## The release
Expand Down
1 change: 1 addition & 0 deletions docs/src/man/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
- uses: julia-actions/cache@v1
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function parseblock(code::AbstractString, doc, file; skip = 0, keywords = true,
end
if linenumbernode isa LineNumberNode
exs = Meta.parseall(code; filename=linenumbernode.file).args
@assert length(exs) == 2 * length(results)
@assert length(exs) == 2 * length(results) "Issue at $linenumbernode:\n$code"
for (i, ex) in enumerate(Iterators.partition(exs, 2))
@assert ex[1] isa LineNumberNode
expr = Expr(:toplevel, ex...) # LineNumberNode + expression
Expand Down

0 comments on commit 2a6d580

Please sign in to comment.