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

Block code does not use mono spaced font (inline code does however) #90

Closed
g466a opened this issue Jan 23, 2023 · 1 comment
Closed

Comments

@g466a
Copy link

g466a commented Jan 23, 2023

Actual Behavior:

  • block code using triple backspace shows a block like it should
  • highlighting works
  • the font is NOT mono spaced

Expected Behavior:

  • block code using triple backspace shows a block like it should
  • highlighting works
  • the font IS mono spaced

Steps to reproduce:

  • Start Markdown.AvaloniaDemo (stable or master)
  • Scroll down to the block code

What that means for my use case:

  • I am building a flash card learning program

  • The cards content is md, drawn using Markdown.Avalonia

  • One type of card is used to learn guitar tabs and chords, as a type of ascii art
    image

  • Hint: the tabs can get much more complicated and its impossible to read the tabs in that case - in the above example it does not seem to be a big issue

  • The tabs and chords are drawn in ascii representation

  • The tabs and chords are impossible to use without mono spaced fonts

Workaround:

  • use single backspace quote, aka inline code
  • problem: looks ugly in this case (background grey very irregular)
whistyun added a commit that referenced this issue Jan 25, 2023
1. apply a monospace font for codeblock elements. refs #90
2. modify list parsing: mistake treating bold syntax as horizontal line. refs whistyun/MdXaml#52
whistyun added a commit that referenced this issue Jan 25, 2023
1. apply a monospace font for codeblock elements. refs #90
2. modify list parsing: mistake treating bold syntax as horizontal line. refs whistyun/MdXaml#52
@whistyun
Copy link
Owner

whistyun commented Feb 2, 2023

v11.0.0-a8 and v0.10.13 fix this issue.

Code blocks with or without syntax highlighting have monospaced font.

input:

```c
#include <stdio.h>
int main();
```

```
#include <stdio.h>
int main();
```

Output:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants