whistyun / Markdown.Avalonia

render markdown with Avalonia UI
MIT License
288 stars 22 forks source link

suggestion #104

Closed dayAndnight2018 closed 1 year ago

dayAndnight2018 commented 1 year ago

|color-text(1) |Proprietary| %{color:red}colortext% | |color-text(2) |Proprietary| %{color:#00FF00}colortext% |

could we add bgcolor to realize highlight effect?

dayAndnight2018 commented 1 year ago

@whistyun

dayAndnight2018 commented 1 year ago

maybe it is better to support multilines instead of just one line.

whistyun commented 1 year ago

The forecolor syntax is implemented with reference to syntax in Textlie. I think singleline marker and multiline marker should also be based on Texttile as well.

sample

%{background:pink}The quick brown fox jumps over the lazy dog. This text displays all alphabetic characters.%

p{background-color:cyan}. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.  
This text displays all alphabetic characters.

The lazy dog overlook the quick brown fox that jumped.

image

Do you have any suggestions?

dayAndnight2018 commented 1 year ago

Yeah, it is just one kind of standard to define how and what to realize in markdown, also the usage experience of developers is important. Besides, I want to say if it is possible to set forecolor and bakground together in one label? just like this:

%{color: white; bgcolor: black} what you want to highlight %

dayAndnight2018 commented 1 year ago

What I mean about multilines support is just like the annotations usage in java or c++. They both support "/xxx/". But it is strange to realize it here because a blank line is used to represent one paragraph in markdown. So, may be this is the reason Textlie realize it in such way.

dayAndnight2018 commented 1 year ago

Is there any progress about this issue? @whistyun

dayAndnight2018 commented 1 year ago

Addition please, the syntax is very strict, for example: %{color: red}colortext% will have no effect, just because there is one blank between ":" and "red"

dayAndnight2018 commented 1 year ago

maybe it is necessary for %{} , but the content of {} here should be more comfortable.

whistyun commented 1 year ago

There are issues in this repository that need to be fixed on ver11 and there are other issues in another repository.

I am goint to fix this suggession on ver11. therefore I lower the priority of this proposal.


About singleline, "background" is able to coexist with the "color". And spaces handling well be corrected.

This means that the following notations will be available.

  1. %{ color : red ; background : yellow }some word%
  2. %{ background : yellow ; color : red }some word%
  3. %{color : red}some word%
  4. %{background: yellow}some word%

About multiline, I'm no idea for now.

dayAndnight2018 commented 1 year ago

There are issues in this repository that need to be fixed on ver11 and there are other issues in another repository.

I am goint to fix this suggession on ver11. therefore I lower the priority of this proposal.

About singleline, "background" is able to coexist with the "color". And spaces handling well be corrected.

This means that the following notations will be available.

  1. %{ color : red ; background : yellow }some word%
  2. %{ background : yellow ; color : red }some word%
  3. %{color : red}some word%
  4. %{background: yellow}some word%

About multiline, I'm no idea for now.

great!

dayAndnight2018 commented 1 year ago

There are issues in this repository that need to be fixed on ver11 and there are other issues in another repository.

I am goint to fix this suggession on ver11. therefore I lower the priority of this proposal.

About singleline, "background" is able to coexist with the "color". And spaces handling well be corrected.

This means that the following notations will be available.

  1. %{ color : red ; background : yellow }some word%
  2. %{ background : yellow ; color : red }some word%
  3. %{color : red}some word%
  4. %{background: yellow}some word%

About multiline, I'm no idea for now.

Is there any change here ?

whistyun commented 1 year ago

Apologies for the long delay. Markdown.Avalonia 11.0.0 has been released. The new syntax posted here has been added.

dayAndnight2018 commented 1 year ago

Apologies for the long delay. Markdown.Avalonia 11.0.0 has been released. The new syntax posted here has been added.

well done! update wiki please