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

Make slugs active in tip-, note-, important-, and caution-flagged notice fields #212

Closed
dmihaylo opened this issue Mar 16, 2022 · 3 comments · Fixed by #232
Closed

Make slugs active in tip-, note-, important-, and caution-flagged notice fields #212

dmihaylo opened this issue Mar 16, 2022 · 3 comments · Fixed by #232
Assignees
Labels
est: medium Estimated for 3-5 dev days feature new functionality, style, behavior etc sev: high Impacts all documentations sites

Comments

@dmihaylo
Copy link
Contributor

dmihaylo commented Mar 16, 2022

When we have a note that is flagged as >tip, >note, >important, or >caution, slugs (both with and w/o an opening and closing space) are not working.

For example, in the >tip note at the end of this section: https://docs.telerik.com/aspnet-core/getting-started/first-steps#initializing-a-grid-and-binding-data.

The content in question has the following syntax:

>tip For more information on data processing and data binding, see the following articles:
>* [Binding the Grid to a database]({% slug htmlhelpers_grid_aspnetcore_ajaxbinding %})
>* [CRUD operations](https://demos.telerik.com/aspnet-core/grid/editing)

Please review this issue to allow more unlimited syntax usage that will help docs creators to stay focused on the content and not on the way for introducing it depending on the cases.

@Iankodj Iankodj added feature new functionality, style, behavior etc sev: high Impacts all documentations sites est: medium Estimated for 3-5 dev days labels Mar 16, 2022
@dmihaylo dmihaylo changed the title Make space-using slugs active in tip-, note-, and caution-flagged notice fields Make slugs active in tip-, note-, important-, and caution-flagged notice fields Mar 17, 2022
@dimodi
Copy link
Collaborator

dimodi commented Apr 13, 2022

If not too much hassle, fix for >caption too

@pepinho24
Copy link
Collaborator

The related PR #232 improves the regex that captures the slug to check for 0 or more occurrences of the %20 string between the % and slug keyword as well as between the actual slug and the ending % sign. The %20 is actually a string, due to the logic of the plugin that converts manually the markdown to HTML, hence the whitespace becomes %20

Updated test cases: https://rubular.com/r/iHWvuRumrtLtRy

Description of the fix: (?:%20){0,} - create a non-capturing group of the string %20 and check if it is encountered 0 or more times

@pepinho24
Copy link
Collaborator

@dimodi The caption is generated from another plugin that seems to not have any logic for fixing the slugs, so I opened a separate issue for it - #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
est: medium Estimated for 3-5 dev days feature new functionality, style, behavior etc sev: high Impacts all documentations sites
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants