mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Fixed code block annotations
This commit is contained in:
parent
e11fce36db
commit
3d6510c441
@ -247,7 +247,7 @@ document$.subscribe(function() { // (1)
|
|||||||
|
|
||||||
_Result_:
|
_Result_:
|
||||||
|
|
||||||
``` {: .js .annotate }
|
``` { .js .annotate }
|
||||||
document$.subscribe(function() { // (1)
|
document$.subscribe(function() { // (1)
|
||||||
var tables = document.querySelectorAll(/* (2) */ "article table")
|
var tables = document.querySelectorAll(/* (2) */ "article table")
|
||||||
tables.forEach(function(table) {
|
tables.forEach(function(table) {
|
||||||
|
@ -176,7 +176,7 @@ theme:
|
|||||||
- search.highlight
|
- search.highlight
|
||||||
```
|
```
|
||||||
|
|
||||||
Searching for [:octicons-search-24: ^^code highlighting^^][11] yields:
|
Searching for [:octicons-search-24: ^^code blocks^^][11] yields:
|
||||||
|
|
||||||
[![Search highlighting][12]][12]
|
[![Search highlighting][12]][12]
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ When a user enters a query into the search box, the query is pre-processed
|
|||||||
before it is submitted to the search index. Material for MkDocs will apply the
|
before it is submitted to the search index. Material for MkDocs will apply the
|
||||||
following transformations, which can be customized by [extending the theme][20]:
|
following transformations, which can be customized by [extending the theme][20]:
|
||||||
|
|
||||||
``` ts
|
``` { .ts .annotate }
|
||||||
export function defaultTransform(query: string): string {
|
export function defaultTransform(query: string): string {
|
||||||
return query
|
return query
|
||||||
.split(/"([^"]+)"/g) /* (1) */
|
.split(/"([^"]+)"/g) /* (1) */
|
||||||
|
Loading…
Reference in New Issue
Block a user