mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29: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,
|
||||
|
||||
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 toc = this.computeToc(this.documentOptions["toc"]);
|
||||
var tocHTML = this.tocToHTML(toc);
|
||||
|
||||
return {
|
||||
title: title,
|
||||
titleHTML: titleHTML,
|
||||
contentHTML: contentHTML,
|
||||
tocHTML: tocHTML,
|
||||
toc: toc,
|
||||
toString: function () {
|
||||
return titleHTML + "\n" + contentHTML;
|
||||
return contentHTML;
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
function render_org(query, data, classPrefix="") {
|
||||
var orgCode = `Query: ${query}\n` + data.map(function (item) {
|
||||
var orgCode = data.map(function (item) {
|
||||
return `${item.entry}`
|
||||
}).join("\n")
|
||||
var orgParser = new Org.Parser();
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
function render_markdown(query, data) {
|
||||
var md = window.markdownit();
|
||||
return md.render(`# Query: ${query}\n` + data.map(function (item) {
|
||||
return md.render(data.map(function (item) {
|
||||
return `${item.entry}`
|
||||
}).join("\n"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user