MyNihongo / MudBlazor.Markdown

Markdown component based on the MudBlazor environment
https://mudblazor.com/
MIT License
132 stars 13 forks source link

Feature Request: Custom Pipeline #197

Closed MaxGuernseyIII closed 1 year ago

MaxGuernseyIII commented 1 year ago

It would be nice to be able to set the pipeline as a parameter or inject the pipeline so I can use my own custom pipeline.

MaxGuernseyIII commented 1 year ago

I'd happily just write the PR but I couldn't find instructions on what the preferred way to contribute is. If you let me know what that is, I'll do it.

MihailsKuzmins commented 1 year ago

@MaxGuernseyIII
I wonder what is the intention having your own custom pipeline? What conditions are there which are not satisfied by the current pipeline?

MaxGuernseyIII commented 1 year ago

To create an instance with features not supported out of the box.

On Sun, Aug 13, 2023, 6:57 PM MihailsKuzmins @.***> wrote:

@MaxGuernseyIII https://github.com/MaxGuernseyIII I wonder what is the intention having your own custom pipeline? What conditions are there which are not satisfied by the current pipeline?

— Reply to this email directly, view it on GitHub https://github.com/MyNihongo/MudBlazor.Markdown/issues/197#issuecomment-1676563427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4DRFRUEWQVE63ZOB3XVOTXVGAXDANCNFSM6AAAAAA3L7AYL4 . You are receiving this because you were mentioned.Message ID: @.***>

MihailsKuzmins commented 1 year ago

To create an instance with features not supported out of the box.

What instance are you talking about? And how is it related to the pipeline (CI/CD)?

Or do you mean that some markdown is not rendered correctly. If it is the case could you submit the markdown and I will take a look? Or you can just fork the repo, try to implement it yourself and submit a PR.

MaxGuernseyIII commented 1 year ago

I see the confusion, now. I mean a new markdown pipeline. Like there is literally a field named _pipeline that I would like to have a Razor parameter to set. Or, alternatively, I'd like to be able to inject it through the service container. I'll give a more detail less description of what I mean when I'm near a computer.

-- Max

There are 10 kinds of people: those who don't understand binary, those who don't understand trinary, and so on...

On Sun, Aug 13, 2023, 9:44 PM MihailsKuzmins @.***> wrote:

To create an instance with features not supported out of the box.

What instance are you talking about? And how is it related to the pipeline (CI/CD)?

Or do you mean that some markdown is not rendered correctly. If it is the case could you submit the markdown and I will take a look? Or you can just fork the repo, try to implement it yourself and submit a PR.

— Reply to this email directly, view it on GitHub https://github.com/MyNihongo/MudBlazor.Markdown/issues/197#issuecomment-1676666802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4DRFSZH6EXV22SE22O6X3XVGUJZANCNFSM6AAAAAA3L7AYL4 . You are receiving this because you were mentioned.Message ID: @.***>

my-nihongo commented 1 year ago

Hi, @MaxGuernseyIII Is this issue still relevant? If it is, could you please provide the requirements? Otherwise, I am afraid that I will be forced to close the issue assuming that it is irrelevant.

Sorry for causing trouble, but I ask for your cooperation.

MaxGuernseyIII commented 1 year ago

Yes. It's still relevant. Give me a few minutes.

MaxGuernseyIII commented 1 year ago

In MudMarkdown.razor.cs, line 13:

    private readonly MarkdownPipeline _pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

Could be

        [Parameter]
    public MarkdownPipeline Pipeline { get; set; } = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

        private MarkdownPipeline _pipeline => Pipeline;

That would make my life a lot easier.

MaxGuernseyIII commented 1 year ago

...or if you let me know what the preferred method for me to submit a PR is, I could just make the change, myself.

MihailsKuzmins commented 1 year ago

I see, so you want a custom MarkdownPipeline parameter. I would prefer supplying it as a parameter ([Parameter]), but in a slightly different way as you proposed. I think can try to look into it this weekend, does not sound like a lot of work.

MaxGuernseyIII commented 1 year ago

Thanks!

-- Max

There are 10 kinds of people: those who don't understand binary, those who don't understand trinary, and so on...

On Tue, Aug 22, 2023, 5:03 PM MihailsKuzmins @.***> wrote:

I see, so you want a custom MarkdownPipeline parameter. I would prefer supplying it as a parameter ([Parameter]), but in a slightly different way as you proposed. I think can try to look into it this weekend, does not sound like a lot of work.

— Reply to this email directly, view it on GitHub https://github.com/MyNihongo/MudBlazor.Markdown/issues/197#issuecomment-1689074319, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4DRFSFP4QESW4ZSRPYYRTXWVCD3ANCNFSM6AAAAAA3L7AYL4 . You are receiving this because you were mentioned.Message ID: @.***>

MihailsKuzmins commented 1 year ago

@MaxGuernseyIII The MarkdownPipeline has been added. In the meantime you could download the code and check whether it is what you need. It will take some tome to take care of another issue you have created 🙇