mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
Remove redundant query as title in results section
- Regain screen real-estate - Remove unused parameters, html being returned by org.js
This commit is contained in:
@@ -1410,20 +1410,12 @@ var Org = (function () {
|
|||||||
__proto__: Converter.prototype,
|
__proto__: Converter.prototype,
|
||||||
|
|
||||||
convert: function () {
|
convert: function () {
|
||||||
var title = this.orgDocument.title ? this.convertNode(this.orgDocument.title) : this.untitled;
|
|
||||||
var titleHTML = this.tag("h" + Math.max(Number(this.headerOffset), 1), title);
|
|
||||||
var contentHTML = this.convertNodes(this.orgDocument.nodes, false /* record headers */);
|
var contentHTML = this.convertNodes(this.orgDocument.nodes, false /* record headers */);
|
||||||
var toc = this.computeToc(this.documentOptions["toc"]);
|
|
||||||
var tocHTML = this.tocToHTML(toc);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title,
|
|
||||||
titleHTML: titleHTML,
|
|
||||||
contentHTML: contentHTML,
|
contentHTML: contentHTML,
|
||||||
tocHTML: tocHTML,
|
|
||||||
toc: toc,
|
|
||||||
toString: function () {
|
toString: function () {
|
||||||
return titleHTML + "\n" + contentHTML;
|
return contentHTML;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function render_org(query, data, classPrefix="") {
|
function render_org(query, data, classPrefix="") {
|
||||||
var orgCode = `Query: ${query}\n` + data.map(function (item) {
|
var orgCode = data.map(function (item) {
|
||||||
return `${item.entry}`
|
return `${item.entry}`
|
||||||
}).join("\n")
|
}).join("\n")
|
||||||
var orgParser = new Org.Parser();
|
var orgParser = new Org.Parser();
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
function render_markdown(query, data) {
|
function render_markdown(query, data) {
|
||||||
var md = window.markdownit();
|
var md = window.markdownit();
|
||||||
return md.render(`# Query: ${query}\n` + data.map(function (item) {
|
return md.render(data.map(function (item) {
|
||||||
return `${item.entry}`
|
return `${item.entry}`
|
||||||
}).join("\n"));
|
}).join("\n"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user