Skip to content

fix(markdown): detect inline component followed non whitespace characters - #1227

Merged
farnabaz merged 8 commits into
mainfrom
fix/inline-component-comma
Jun 9, 2022
Merged

farnabaz merged 8 commits into
mainfrom
fix/inline-component-comma

Conversation

@farnabaz

@farnabaz farnabaz commented Jun 7, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #1217

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify

netlify Bot commented Jun 7, 2022 •

Copy link
Copy Markdown

✅ Deploy Preview for nuxt-content ready!

Name Link
🔨 Latest commit 750311e
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/62a1b1d8cfb8eb000853874b
😎 Deploy Preview https://deploy-preview-1227--nuxt-content.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@leipert

leipert commented Jun 7, 2022

Copy link
Copy Markdown

@farnabaz thanks for getting started right away. I think there should be more characters allowed than just dot and comma. Question marks, exclamation marks, colons, semi colons, etc.

I wonder (especially if you used square brackets and curly brackets before), if just any character that cannot be used in a component name should be allowed.

@farnabaz

farnabaz commented Jun 8, 2022

Copy link
Copy Markdown
Member Author

@leipert You are right, only ASCII chars, -, _ and : can create invalid results when they appear at the end of an inline component. Other characters are safe to use.
Also for using -, _ and : at the end of a component we can create a dummy attribute for the component. :hello{}-world

@farnabaz farnabaz changed the title fix(markdown): detect inline component followed by . and , fix(markdown): detect inline component followed non whitespace characters Jun 8, 2022
@farnabaz
farnabaz merged commit 3535738 into main Jun 9, 2022
@farnabaz
farnabaz deleted the fix/inline-component-comma branch June 9, 2022 08:50
@farnabaz farnabaz mentioned this pull request Aug 12, 2022
farnabaz added a commit that referenced this pull request Sep 7, 2022
…ters (#1227)

* fix(markdown): detect inline component followed by `.` and `,`

* test: add test

* chore: code style

* fix: detect inline component regardless of ending character

* test: update tests

* docs(mdc): add example for inline ending chars

* test: fix

Co-authored-by: Yaël Guilloux <yael.guilloux@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MDC inline components do not work if followed by non-whitespace character

4 participants