Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding support for CRLF in the parser #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Mathys-Gasnier merged 1 commit into quicksnip-dev:main from Mathys-Gasnier:main
Jan 5, 2025

Conversation

Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier commented Jan 5, 2025

Description

People were complaning, so here is CRLF support, might cause issues with snippets code, but oh well.

Type of Change

  • ✨ New snippet
  • πŸ›  Improvement to an existing snippet
  • 🐞 Bug fix
  • πŸ“– Documentation update
  • πŸ”§ Other (please describe): Snippet parser

const propertyRegex = /^\s+([a-zA-Z]+):\s*(.+)/;
const headerEndCodeStartRegex = /^\s*---\s*```.*\n/;
const headerEndCodeStartRegex = /^\s*---\s*```.*\r?\n/;
Copy link
Collaborator

@saminjay saminjay Jan 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's rarely used anymore but some systems (I think macs) used to use CR or \r for new line. Should we add support for that also?

Copy link
Collaborator Author

@Mathys-Gasnier Mathys-Gasnier Jan 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should worry about that, otherwise everything is going to get complicated, really quickly

@Mathys-Gasnier Mathys-Gasnier merged commit 87706b4 into quicksnip-dev:main Jan 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@saminjay saminjay saminjay left review comments

@technoph1le technoph1le technoph1le approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /