Skip to content

Commit

Permalink
Fixed from version 1.1.3 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
FAXES authored Mar 25, 2024
1 parent 78f12d3 commit d2bac0d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion block/contDanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function convert(string, plain) {
let start = string.indexOf(conf.open);
let end = string.indexOf(conf.close, start + conf.open.length);
let ogText = string.substring(start, end + conf.close.length);
let str = `${ogText.replace(`${conf.open} `, '').replace(` ${conf.close}`, '')}`
let str = `${ogText.replace(`${conf.open}`, '').replace(`${conf.close}`, '')}`
let content = `<div${main.getStyle('contDanger', true)}>${str}</div>`;
string = string.replace(ogText, content)
return string;
Expand Down
4 changes: 1 addition & 3 deletions block/contInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ function convert(string, plain) {
let start = string.indexOf(conf.open);
let end = string.indexOf(conf.close, start + conf.open.length);
let ogText = string.substring(start, end + conf.close.length);
let str = `${ogText.replace(`${conf.open} `, '').replace(` ${conf.close}`, '')}`
let str = `${ogText.replace(`${conf.open}`, '').replace(`${conf.close}`, '')}`
let content = `<div${main.getStyle('contInfo', true)}>${str}</div>`;
string = string.replace(ogText, content)
// console.log(string)
// process.exit(0);
return string;
}

Expand Down
2 changes: 1 addition & 1 deletion block/contPrimary.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function convert(string, plain) {
let start = string.indexOf(conf.open);
let end = string.indexOf(conf.close, start + conf.open.length);
let ogText = string.substring(start, end + conf.close.length);
let str = `${ogText.replace(`${conf.open} `, '').replace(` ${conf.close}`, '')}`
let str = `${ogText.replace(`${conf.open}`, '').replace(`${conf.close}`, '')}`
let content = `<div${main.getStyle('contPrimary', true)}>${str}</div>`;
string = string.replace(ogText, content)
return string;
Expand Down
2 changes: 1 addition & 1 deletion block/contSuccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function convert(string, plain) {
let start = string.indexOf(conf.open);
let end = string.indexOf(conf.close, start + conf.open.length);
let ogText = string.substring(start, end + conf.close.length);
let str = `${ogText.replace(`${conf.open} `, '').replace(` ${conf.close}`, '')}`
let str = `${ogText.replace(`${conf.open}`, '').replace(`${conf.close}`, '')}`
let content = `<div${main.getStyle('contSuccess', true)}>${str}</div>`;
string = string.replace(ogText, content)
return string;
Expand Down
2 changes: 1 addition & 1 deletion block/contWarning.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function convert(string, plain) {
let start = string.indexOf(conf.open);
let end = string.indexOf(conf.close, start + conf.open.length);
let ogText = string.substring(start, end + conf.close.length);
let str = `${ogText.replace(`${conf.open} `, '').replace(` ${conf.close}`, '')}`
let str = `${ogText.replace(`${conf.open}`, '').replace(`${conf.close}`, '')}`
let content = `<div${main.getStyle('contWarning', true)}>${str}</div>`;
string = string.replace(ogText, content)
return string;
Expand Down
2 changes: 1 addition & 1 deletion dev/test.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p class="convertPara">text here <div class="convertinfo">FaxStore is a Node.Js based website and requires a server (VPS, Dedicated) to operate. Shared hosting doesn't work</div> As FaxStore is a Node.Js operating website it requires a little more power than you might be used to with a more common site. This article covers some more specific details on what you need to run FaxStore. > All of FaxStores documentation is created for Ubuntu 20 based Linux servers. Currently we don't offer any Windows guides. It's highly recommended to use a Ubuntu 20 based Linux server for hosting FaxStore. ### What do you need? To have the ability to have FaxStore running using our installation guide it's recommended to use the following. - Server (This can be a VPS or Dedicated machine, Ubuntu is recommended) - A domain name (<code>faxes.zone</code> for example). This is used to get your website to the online world via a public access domain - PayPal business or Stripe account to be able to receive any payments. - Discord, Google, Twitter, or GitHub account to use for Login methods. #### System Requirements These are the minimum and recommended requirements for your system to have to host FaxStore. | Minimum | Recommended | |----------------------------------------------------------------------|------------------------------------------------------------------------| | <strong>OS:</strong> Ubuntu 18.04 LTS </p><p class="convertPara"><strong>Processor:</strong> 1 CPU Core </p><p class="convertPara"><strong>Memory:</strong> 2GB </p><p class="convertPara"><strong>Storage:</strong> 25GB | <strong>OS:</strong> Ubuntu 20.04 LTS </p><p class="convertPara"><strong>Processor:</strong> 3 CPU Cores </p><p class="convertPara"><strong>Memory:</strong> 6GB </p><strong>Storage:</strong> 50GB | These specs may vary and be higher or lower, depending on things like, file size uploads, traffic and other general resource usages. --- #### Don't Have a Server? Looking for some swagger in your hosting? TurboNode's got you covered, they're cheap as chips and have great hardware! <a href="https://infusionpeakhosting.com" target="_blank"><img src="https://weblutions.com/i/O29hdj.png" border="0" alt="" width="740" height="100"/></a>
<p class="convertPara"><div class="convertinfo"></p><p class="convertPara">Phil Bot is a Node.Js based website and requires a server (VPS, Dedicated) to operate. Shared hosting doesn't work</p><p class="convertPara"></div></p><p class="convertPara">As Phil Bot is a Node.Js operating website it requires a little more power than you might be used to with a more common site. This article covers some more specific details on what you need to run Phil Bot.</p><p class="convertPara"><blockquote class="convertQuote"></p><p class="convertPara"> All of Phil Bots documentation is created for Ubuntu 20 based Linux servers. Currently we don't offer any Windows guides. It's highly recommended to use a Ubuntu 20 based Linux server for hosting Phil Bot.</blockquote></p><p class="convertPara"><h3 id="what-do-you-need?"> What do you need?</h3></p><p class="convertPara">To have the ability to have Phil Bot running using our installation guide it's recommended to use the following.</p><ul class="convertul"><li class="convertli"> Server (This can be a VPS or Dedicated machine, Ubuntu is recommended)</li><li class="convertli"> A domain name (<code>projectphil.co.uk</code> for example). This is used to get your website to the online world via a public access domain</li><li class="convertli"> PayPal business or Stripe account to be able to receive any payments.</li><li class="convertli"> Discord account to use for Login methods.</li></ul><br><p class="convertPara"><h4 id="system-requirements"> System Requirements</h4></p><p class="convertPara">These are the minimum and recommended requirements for your system to have to host Phil Bot.</p><table class="convertTable"><tr></tr><tr><th>Minimum</th><th>Recommended</th></tr><tr><td><strong>OS:</strong> Ubuntu 18.04 LTS <p class="convertPara"><strong>Processor:</strong> 1 CPU Core </p><p class="convertPara"><strong>Memory:</strong> 2GB </p><p class="convertPara"><strong>Storage:</strong> 25GB</td><td><strong>OS:</strong> Ubuntu 20.04 LTS </p><p class="convertPara"><strong>Processor:</strong> 3 CPU Cores </p><p class="convertPara"><strong>Memory:</strong> 6GB </p><p class="convertPara"><strong>Storage:</strong> 50GB</td></tr><tr></tr></table></p><p class="convertPara">These specs may vary and be higher or lower, depending on things like, file size uploads, traffic and other general resource usages.</p><br><hr class="convertHr" /><p class="convertPara"><h4 id="don't-have-a-server?"> Don't Have a Server?</h4></p><p class="convertPara">Looking for some swagger in your hosting? Infusion Peak Hosting's got you covered, they're cheap as chips and have great hardware!</p><a href="https://infusionpeakhosting.com" target="_blank"><img src="https://cdn.projectphil.co.uk/1155551194337521726/OnKB3X.gif" border="0" alt="" width="740" height="100"/></a>
20 changes: 9 additions & 11 deletions dev/text.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
text here

:::info
FaxStore is a Node.Js based website and requires a server (VPS, Dedicated) to operate. Shared hosting doesn't work
Phil Bot is a Node.Js based website and requires a server (VPS, Dedicated) to operate. Shared hosting doesn't work
:::

As FaxStore is a Node.Js operating website it requires a little more power than you might be used to with a more common site. This article covers some more specific details on what you need to run FaxStore.
As Phil Bot is a Node.Js operating website it requires a little more power than you might be used to with a more common site. This article covers some more specific details on what you need to run Phil Bot.


> All of FaxStores documentation is created for Ubuntu 20 based Linux servers. Currently we don't offer any Windows guides. It's highly recommended to use a Ubuntu 20 based Linux server for hosting FaxStore.
> All of Phil Bots documentation is created for Ubuntu 20 based Linux servers. Currently we don't offer any Windows guides. It's highly recommended to use a Ubuntu 20 based Linux server for hosting Phil Bot.

### What do you need?

To have the ability to have FaxStore running using our installation guide it's recommended to use the following.
To have the ability to have Phil Bot running using our installation guide it's recommended to use the following.

- Server (This can be a VPS or Dedicated machine, Ubuntu is recommended)
- A domain name (`faxes.zone` for example). This is used to get your website to the online world via a public access domain
- A domain name (`projectphil.co.uk` for example). This is used to get your website to the online world via a public access domain
- PayPal business or Stripe account to be able to receive any payments.
- Discord, Google, Twitter, or GitHub account to use for Login methods.
- Discord account to use for Login methods.

#### System Requirements

These are the minimum and recommended requirements for your system to have to host FaxStore.
These are the minimum and recommended requirements for your system to have to host Phil Bot.

| Minimum | Recommended |
|----------------------------------------------------------------------|------------------------------------------------------------------------|
Expand All @@ -34,6 +32,6 @@ These specs may vary and be higher or lower, depending on things like, file size

#### Don't Have a Server?

Looking for some swagger in your hosting? TurboNode's got you covered, they're cheap as chips and have great hardware!
Looking for some swagger in your hosting? Infusion Peak Hosting's got you covered, they're cheap as chips and have great hardware!

<a href="https://infusionpeakhosting.com" target="_blank"><img src="https://weblutions.com/i/O29hdj.png" border="0" alt="" width="740" height="100"/></a>
<a href="https://infusionpeakhosting.com" target="_blank"><img src="https://cdn.projectphil.co.uk/1155551194337521726/OnKB3X.gif" border="0" alt="" width="740" height="100"/></a>
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ function updateStyle(index, property) {

function convert(string, options = {sanitize: false, plainText: false}) {
if(options.sanitize) string = string.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
if(!options.plainText) string = `${string.replaceAll("\r", "").replaceAll("\n", " ")}`;
if(!options.plainText) string = `${string.replaceAll("\r", "")}`;
for (let i = 0; i < markdownBlock.length; i++) {
const block = markdownBlock[i];
// console.log(block.open)
if(block.open && block.close) {
while(findNextMatch(string, block.open, block.close, 0) !== -1) {
// console.log(findNextMatch(string, block.open, block.close, 0), string.substring(findNextMatch(string, block.open, block.close, 0), findNextMatch(string, block.open, block.close, 0)+50))
let r = block.exec(string, options.plainText);
string = r;
}
Expand Down

0 comments on commit d2bac0d

Please sign in to comment.