diff --git a/app/components/search/autocomplete-item/index.hbs b/app/components/search/autocomplete-item/index.hbs
index 894dfd0..250cc99 100644
--- a/app/components/search/autocomplete-item/index.hbs
+++ b/app/components/search/autocomplete-item/index.hbs
@@ -1,5 +1,10 @@
-
-
- {{@item.title}}
- {{@item.path}}
-
\ No newline at end of file
+
+
+
+
{{@item.title}}
+
{{@item.path}}
+
+
+
+
diff --git a/app/components/search_results/document/index.hbs b/app/components/search_results/document/index.hbs
index 55a8872..2a1bea0 100644
--- a/app/components/search_results/document/index.hbs
+++ b/app/components/search_results/document/index.hbs
@@ -6,9 +6,7 @@
{{@result_node.title}}
-
-
-
\ No newline at end of file
+
diff --git a/app/modifiers/text_to_dom.js b/app/modifiers/text_to_dom.js
new file mode 100644
index 0000000..6641329
--- /dev/null
+++ b/app/modifiers/text_to_dom.js
@@ -0,0 +1,49 @@
+import Modifier from 'ember-modifier';
+
+
+export default class TextToDom extends Modifier {
+ /*
+ Converts plain text to HTML DOM elements and inserts them
+ as children to `this.element`
+
+ Autocomplete receives text matching highlights as plain text e.g.
+
+ "This is great match".
+
+ Besides the fact that you cannot style plain text, it is also
+ rendered with tag.
+ To fix this problem hightlight text is converted to DOM nodes.
+ */
+ didReceiveArguments() {
+
+ let text = this.args.positional[0],
+ template,
+ nodes,
+ that = this,
+ em_element,
+ text_element;
+
+ // inspired from https://stackoverflow.com/a/35385518
+ // HTML5's tag can be used to convinently convert
+ // text into DOM nodes
+ template = document.createElement('template');
+ template.innerHTML = text;
+
+ // voila!
+ nodes = template.content.childNodes;
+
+ nodes.forEach(node => {
+ // is it some match ?
+ if (node.nodeName == 'EM') {
+ em_element = document.createElement('em');
+ em_element.textContent = node.firstChild.textContent;
+ that.element.appendChild(em_element);
+ } else {
+ // otherwise node is a plain text
+ text_element = document.createTextNode(node.textContent);
+ that.element.appendChild(text_element);
+ }
+ });
+ }
+
+}
diff --git a/app/styles/search.scss b/app/styles/search.scss
index e8488c0..b2a5688 100644
--- a/app/styles/search.scss
+++ b/app/styles/search.scss
@@ -20,6 +20,13 @@
padding: 0;
z-index: 1;
+ .text-muted {
+ em {
+ color: green;
+ font-weight: bold;
+ }
+ }
+
li:hover {
background-color: #e9e9e9;
border-left: 1px solid #0d6efd;