Skip to content
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

JS/SCSS shortcodes: Add new feature to remove nested calls inside. #38838

Merged
merged 1 commit into from Jul 6, 2023

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Jun 27, 2023

Description

Remove nested calls to shortcodes. I had to face this issue in my project, so updating it here if it can help. Changed the js shortcode as well.

Motivation & Context

Nested calls to shortcodes. For instance:

// scss-docs-start accordion-variables
...
// scss-docs-start random-variables-that-I-needed
...
// scss-docs-end accordion-variables
...
// scss-docs-end random-variables-that-I-needed

I didn't want to have the // scss-docs-start random-variables-that-I-needed inside my accordion documentation.

Moreover, adding this, had a weird behavior: It renders twice.

// scss-docs-start accordion-variables
...
// scss-docs-end accordion-variables
...
// scss-docs-start accordion-variables-xxl
...
// scss-docs-end accordion-variables-xxl

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • (NA) My change introduces changes to the documentation
  • (NA) I have updated the documentation accordingly
  • (NA) I have added tests to cover my changes
  • (NA) All new and existing tests passed

Live previews

NA since it's defensive code.

Related issues

NA

Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

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

Love it!

@mdo mdo merged commit e2854b9 into main Jul 6, 2023
15 checks passed
@mdo mdo deleted the main-lmp-docs-shortcodes-fix branch July 6, 2023 05:11
romankupchak93 pushed a commit to romankupchak93/bootstrap that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants