Skip to content

Commit f90e4f6

Browse files
authored
Merge branch 'develop' into fix-search
2 parents d3163b3 + 4807e58 commit f90e4f6

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

docs/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#carbonads {
2424
box-shadow: none !important;
25+
width: auto !important;
2526
}
2627
</style>
2728
</head>

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#carbonads {
2020
box-shadow: none !important;
21+
width: auto !important;
2122
}
2223
</style>
2324
</head>

src/core/render/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export class Compiler {
279279
// Remove headers who are under current header
280280
for (
281281
let j = i;
282-
deletedHeaderLevel < toc[j].level && j < toc.length;
282+
j < toc.length && deletedHeaderLevel < toc[j].level;
283283
j++
284284
) {
285285
toc.splice(j, 1) && j-- && i++;

src/core/render/compiler/code.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import Prism from 'prismjs';
33
import 'prismjs/components/prism-markup-templating';
44

55
export const highlightCodeCompiler = ({ renderer }) =>
6-
(renderer.code = function(code, lang = '') {
6+
(renderer.code = function(code, lang = 'markup') {
77
const langOrMarkup = Prism.languages[lang] || Prism.languages.markup;
88
const text = Prism.highlight(
99
code.replace(/@DOCSIFY_QM@/g, '`'),
10-
langOrMarkup
10+
langOrMarkup,
11+
lang
1112
);
1213

1314
return `<pre v-pre data-lang="${lang}"><code class="lang-${lang}">${text}</code></pre>`;

src/plugins/search/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function init(config, vm) {
212212
let namespaceSuffix = '';
213213

214214
// only in auto mode
215-
if (isAuto && config.pathNamespaces) {
215+
if (paths.length && isAuto && config.pathNamespaces) {
216216
const path = paths[0];
217217

218218
if (Array.isArray(config.pathNamespaces)) {

0 commit comments

Comments
 (0)