Compare commits

...

2 Commits

3 changed files with 31 additions and 7 deletions

6
searchserver/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
# Editor
*.swp
*.swo
meilisearch-linux-amd64
data.ms/

14
searchserver/README.md Normal file
View 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
```

View File

@ -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>
: