Skip to content

Commit

Permalink
revert: unrelated and wrong changes
Browse files Browse the repository at this point in the history
layout, styles and view destroying
  • Loading branch information
tonn committed Mar 31, 2019
1 parent f940370 commit 0da78d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 8 additions & 3 deletions lib/datatip-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ module.exports = class DatatipManager {
}
}

/**
* [makeHtmlFromMarkedStrings description]
* @param {[type]} markedStrings [description]
* @param {String} grammarName [description]
* @return {String} [description]
*/
makeHtmlFromMarkedStrings(markedStrings, grammarName) {
const regExpLSPPrefix = /^\((method|property|parameter|alias)\)\W/;

Expand All @@ -323,9 +329,7 @@ module.exports = class DatatipManager {
return string.value;
} else if (string.type === 'snippet') {
const snippet = string.value.replace(regExpLSPPrefix, '');
return `<div class="datatip-marked-snippet">
<pre><code class="${grammarName}">${snippet}</code></pre>
</div>`;
return `<pre><code class="${grammarName}">${snippet}</code></pre>`;
}
})
.join('<br>');
Expand Down Expand Up @@ -387,6 +391,7 @@ module.exports = class DatatipManager {
new Disposable(() => overlayMarker.destroy()),
new Disposable(() => {
this.editorView.addEventListener("mousemove", this.onMouseMoveEvt);
view.destroy();
}),
new Disposable(() => marker.destroy())
);
Expand Down
9 changes: 2 additions & 7 deletions styles/atom-ide-datatips-marked.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
font-size: var(--editor-font-size);
max-height: 480px;
max-width: 64em;
overflow-x: hidden;
overflow-y: auto;
overflow: auto;
white-space: normal;

// Avoid excess internal padding from markdown blocks.
Expand All @@ -24,13 +23,9 @@
margin-bottom: 0;
}

.datatip-marked-snippet {
display: inline-block;
pre {
font-family: var(--editor-font-family);
font-size: var(--editor-font-size);
}

pre {
margin-bottom: 8px;
border-radius: 0;
}
Expand Down

0 comments on commit 0da78d7

Please sign in to comment.