Compare commits
2 Commits
b82095ca7a
...
99d3a234f4
Author | SHA1 | Date | |
---|---|---|---|
99d3a234f4 | |||
f95df227f1 |
6
searchserver/.gitignore
vendored
Normal file
6
searchserver/.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Editor
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
meilisearch-linux-amd64
|
||||||
|
data.ms/
|
14
searchserver/README.md
Normal file
14
searchserver/README.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Qotnews Search Server
|
||||||
|
|
||||||
|
Download MeiliSearch with:
|
||||||
|
|
||||||
|
```
|
||||||
|
wget https://github.com/meilisearch/MeiliSearch/releases/download/v0.11.1/meilisearch-linux-amd64
|
||||||
|
chmod +x meilisearch-linux-amd64
|
||||||
|
```
|
||||||
|
|
||||||
|
Run with:
|
||||||
|
|
||||||
|
```
|
||||||
|
MEILI_NO_ANALYTICS=true ./meilisearch-linux-amd64
|
||||||
|
```
|
|
@ -56,9 +56,9 @@ class Article extends React.Component {
|
||||||
let nodes = null;
|
let nodes = null;
|
||||||
|
|
||||||
if (story.text) {
|
if (story.text) {
|
||||||
let domparser = new DOMParser();
|
let div = document.createElement('div');
|
||||||
let doc = domparser.parseFromString(story.text, 'text/html');
|
div.innerHTML = story.text;
|
||||||
nodes = doc.querySelector('body').children;
|
nodes = div.childNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -86,10 +86,14 @@ class Article extends React.Component {
|
||||||
<p dangerouslySetInnerHTML={{ __html: x }} />
|
<p dangerouslySetInnerHTML={{ __html: x }} />
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
<>
|
(v.nodeName === '#text' ?
|
||||||
<v.localName dangerouslySetInnerHTML={{ __html: v.innerHTML }} />
|
<p>{v.data}</p>
|
||||||
{v.localName == 'pre' && <button onClick={() => this.pConvert(k)}>Convert Code to Paragraph</button>}
|
:
|
||||||
</>
|
<>
|
||||||
|
<v.localName dangerouslySetInnerHTML={v.innerHTML ? { __html: v.innerHTML } : null} />
|
||||||
|
{v.localName == 'pre' && <button onClick={() => this.pConvert(k)}>Convert Code to Paragraph</button>}
|
||||||
|
</>
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user