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;
|
||||
|
||||
if (story.text) {
|
||||
let domparser = new DOMParser();
|
||||
let doc = domparser.parseFromString(story.text, 'text/html');
|
||||
nodes = doc.querySelector('body').children;
|
||||
let div = document.createElement('div');
|
||||
div.innerHTML = story.text;
|
||||
nodes = div.childNodes;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -86,10 +86,14 @@ class Article extends React.Component {
|
|||
<p dangerouslySetInnerHTML={{ __html: x }} />
|
||||
)
|
||||
:
|
||||
<>
|
||||
<v.localName dangerouslySetInnerHTML={{ __html: v.innerHTML }} />
|
||||
{v.localName == 'pre' && <button onClick={() => this.pConvert(k)}>Convert Code to Paragraph</button>}
|
||||
</>
|
||||
(v.nodeName === '#text' ?
|
||||
<p>{v.data}</p>
|
||||
:
|
||||
<>
|
||||
<v.localName dangerouslySetInnerHTML={v.innerHTML ? { __html: v.innerHTML } : null} />
|
||||
{v.localName == 'pre' && <button onClick={() => this.pConvert(k)}>Convert Code to Paragraph</button>}
|
||||
</>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
:
|
||||
|
|
Loading…
Reference in New Issue
Block a user