Skip to content

Commit 3f15e99

Browse files
Merge branch 'dostonnabotov:main' into main
2 parents ecaffd7 + b5fd7c7 commit 3f15e99

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## QuickSnip Code of Conduct
2+
3+
QuickSnip is a welcoming and collaborative community for developers to organize, share, and discover code snippets. By participating in QuickSnip, you agree to uphold this code of conduct to maintain a friendly and inclusive environment.
4+
5+
### Short Version
6+
7+
- Be respectful to everyone in the community.
8+
- Avoid harassment, trolling, or spamming.
9+
- Ensure QuickSnip remains a safe and productive space for all.
10+
- Report any inappropriate behavior to me, the owner of QuickSnip, at [[email protected]](mailto:[email protected]) or our [Discord team](https://discord.gg/UtJJcnsN).
11+
- No unauthorized bots without prior permission.
12+
13+
---
14+
15+
### Long Version
16+
17+
#### Harassment-Free Environment
18+
19+
We are committed to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, ethnicity, national origin, or religion (or lack thereof). Examples of unacceptable behavior include:
20+
21+
- **Harassment:** Includes sexual language or imagery, deliberate intimidation, stalking, name-calling, unwelcome attention, libel, and malicious hacking or social engineering.
22+
- **Trolling:** Posting inflammatory comments to provoke an emotional response or disrupt discussions.
23+
- **Spamming:** Posting off-topic messages, promoting unrelated products, soliciting donations, advertising jobs or gigs, or flooding discussions with files or text.
24+
25+
#### Reporting Issues
26+
27+
If you experience or witness harassment, trolling, spamming, or any other inappropriate behavior, please report it to me, the owner of QuickSnip, at [[email protected]](mailto:[email protected]) or our QuickSnip [Discord team](https://discord.gg/UtJJcnsN). Include details like screenshots and URLs, if possible, to help us address the issue effectively.
28+
29+
I, or the QuickSnip team will review all reports and take appropriate actions, which may include warnings, temporary bans, or permanent removal from the community.
30+
31+
#### Respectful Use of Bots
32+
33+
No bots are allowed within the QuickSnip community without prior written permission from the QuickSnip team. Unauthorized bots will be removed.
34+
35+
#### Final Notes
36+
37+
This code of conduct is inspired by [FreeCodeCamp’s approach](https://www.freecodecamp.org/news/code-of-conduct), emphasizing clarity and friendliness. Let’s work together to make QuickSnip a supportive and productive space for all developers!
38+

utils/snippetParser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ function raise(issue, snippet = '') {
1616
return null;
1717
}
1818

19+
const crlfRegex = /\r\n/gm;
1920
const propertyRegex = /^\s+([a-zA-Z]+):\s*(.+)/;
2021
const headerEndCodeStartRegex = /^\s*---\s*```.*\n/;
2122
const codeRegex = /^(.+)```/s
2223
function parseSnippet(snippetPath, text) {
24+
if(crlfRegex.exec(text) !== null) return raise('Found CRLF line endings instead of LF line endings', snippetPath);
2325
let cursor = 0;
2426

2527
const fromCursor = () => text.substring(cursor);

0 commit comments

Comments
 (0)