Skip to content

Commit

Permalink
feat: remove trailing \n from code snippets; upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
martapanc committed Mar 6, 2024
1 parent 53d1627 commit e7011df
Show file tree
Hide file tree
Showing 4 changed files with 197 additions and 185 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@heroicons/react": "^2.1.1",
"@mui/material": "^5.15.11",
"@mui/material": "^5.15.12",
"@sendgrid/mail": "^8.1.1",
"@types/cookie": "^0.6.0",
"@types/react-dom": "^18.2.19",
"@types/react-dom": "^18.2.20",
"@types/react-google-recaptcha": "^2.1.9",
"@types/styled-components": "^5.1.34",
"@vercel/speed-insights": "^1.0.10",
Expand All @@ -42,16 +42,16 @@
"inquirer-fuzzy-path": "^2.3.0",
"js-cookie": "^3.0.5",
"moment": "^2.30.1",
"next": "^14.1.1",
"next-cloudinary": "^6.0.1",
"next": "^14.1.2",
"next-cloudinary": "^6.1.0",
"next-themes": "^0.2.1",
"nodemailer": "^6.9.11",
"plop": "^4.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-recaptcha": "^3.1.0",
"react-headroom": "^3.2.1",
"react-i18next": "^14.0.5",
"react-i18next": "^14.0.7",
"react-icons": "^5.0.1",
"react-markdown": "^9.0.1",
"react-moment": "^1.1.3",
Expand All @@ -65,7 +65,7 @@
"tailwind-merge": "^2.2.1",
"typed.js": "^2.1.0",
"unified": "^11.0.4",
"yup": "^1.3.3"
"yup": "^1.4.0"
},
"devDependencies": {
"@commitlint/cli": "^19.0.3",
Expand All @@ -84,14 +84,14 @@
"@testing-library/react": "^14.2.1",
"@types/jest": "^29.5.12",
"@types/js-cookie": "^3.0.6",
"@types/react": "^18.2.61",
"@types/react": "^18.2.63",
"@types/react-headroom": "^3.2.3",
"@types/react-syntax-highlighter": "^15.5.11",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"autoprefixer": "^10.4.18",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.1",
"eslint-config-next": "^14.1.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-storybook": "^0.8.0",
Expand All @@ -104,7 +104,7 @@
"next-sitemap": "^4.2.3",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"prettier-plugin-tailwindcss": "^0.5.12",
"storybook": "^7.6.17",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/markdownUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const readCodeSnippets = (): CodeSnippet[] => {
const content = fs
.readFileSync(filePath, 'utf-8')
.replaceAll('```', '')
.replace(/^\n/, '');
.replace(/^\n|\n$/g, ''); // Remove leading and trailing \n
markdownData.push({
id,
language: filename.replace('.md', ''),
Expand Down
Loading

0 comments on commit e7011df

Please sign in to comment.