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

Check style.Ignore if style is not null. #4095

Merged
merged 1 commit into from
Jul 20, 2021
Merged

Check style.Ignore if style is not null. #4095

merged 1 commit into from
Jul 20, 2021

Conversation

Rosuavio
Copy link
Contributor

@Rosuavio Rosuavio commented Jul 1, 2021

Fixes #4116

Style could have been null on the check for style.Ignore, moved the
check so it cant be null.

In the SampleApp there are docs that we render that have the markdown syntax

> Hello world

And should be rendered as

Hello world

The issues is our code that checks for special quotes with special style tags like [!NOTE] or [!TIP] does not handle there not being one of those style tags at the beginning of the quote and the example code would crash the rendered. This change no longer checks style.Ignore if the style tag is not in our dictionary.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Markdown quotes that don't start with a style tag cash the sample app.

What is the new behavior?

Markdown quotes that don't start with a style tag don't get checked if there non-existing style's Ignore prop is true.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

How it looks now
image

Source https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/blob/a70069e9d133b677507e37f526eadc08299202b5/docs/graph/controls/PersonView.md

@ghost
Copy link

ghost commented Jul 1, 2021

Thanks RosarioPulella for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker and azchohfi July 1, 2021 18:46
@Rosuavio Rosuavio marked this pull request as ready for review July 1, 2021 21:17
@michael-hawker michael-hawker added this to the 7.1 milestone Jul 1, 2021
@ghost
Copy link

ghost commented Jul 1, 2021

Hello @michael-hawker!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 4 hours 53 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@Rosuavio Rosuavio requested a review from XAML-Knight July 5, 2021 17:26
@michael-hawker michael-hawker added bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ markdown 📑 Issues related to Markdown sample app 🖼 and removed controls 🎛️ labels Jul 19, 2021
@michael-hawker
Copy link
Member

@XAML-Knight mind testing this out quick too, should be pretty straight-forward?

I'm pretty sure this just effects the sample app and not the markdown control itself.

Style could have been null on the check for style.Ignore, moved the
check so it cant be null.
@michael-hawker michael-hawker merged commit f67ccd1 into CommunityToolkit:main Jul 20, 2021
@Rosuavio Rosuavio deleted the fix/sample-app/markdown-renderer branch July 20, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merge ⚡ bug 🐛 An unexpected issue that highlights incorrect behavior markdown 📑 Issues related to Markdown sample app 🖼
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faillure rendering sample docs.
3 participants