brrd / abricotine

Markdown editor with inline preview

Home Page:http://abricotine.brrd.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v1.0.0 Linux XFCE Code block rendering

Voorhoeve opened this issue · comments

Great tool! I really like the live preview of math, where you can easily change it if you highlight it with the cursor. Would this also be possible with links (and headings, bold, italic)?

Code blocks
There seems to be a bug in the v1.0.0 (on Linux XFCE) with the rendering of code blocks: spaces in a code block seem to be half width in Abricotine, while it is whole width in the HTML rendering (as supposed to). This does not depend on the monospace font selected.

I also can not find a way to change the font size for code blocks?

Minor issues
It would be nice to correct or add a strict mode for the live preview:

  • it renders a single return as line break, while it should not.
  • it doesn't require a whitespace after a # for headings, while it should.
  • it doesn't require a white line after a code block or block quote, while it does seem to need that for correct output. This is not true for inline block quotes or code blocks.
  • it sometimes corrects numbering of numbered list, but it doesn't correct the first number to 1. It also doesn't always correct the subsquent numbers to what will be displayed. This makes the user falsely believe that they can continue numbered lists, or refer to numbers that will be different in output.
  • it shows a hyperlink for a # followed by any number, as well as any number with more than 6 digits: 1234567 and anything between brackets. But in the HTML export these are just normal text.
  • In larger files, I tend to get a 'file updated' warning when Auto Saving enabled.
  • In larger files, when scrolling I get white areas instead of the text.

IMHO grouping a dozen of requests in a single issue like this one is a very good way to make sure it will never be fully answered 😕

I really like the live preview of math, where you can easily change it if you highlight it with the cursor. Would this also be possible with links (and headings, bold, italic)?

Sorry I don't understand. Is your request a duplicate of #158?

There seems to be a bug in the v1.0.0 (on Linux XFCE) with the rendering of code blocks: spaces in a code block seem to be half width in Abricotine, while it is whole width in the HTML rendering (as supposed to). This does not depend on the monospace font selected.

Can you provide a screenshot please ?

I also can not find a way to change the font size for code blocks?

Please read https://github.com/brrd/abricotine/blob/develop/docs/themes.md

it renders a single return as line break, while it should not.
it doesn't require a whitespace after a # for headings, while it should.
it doesn't require a white line after a code block or block quote, while it does seem to need that for correct output. This is not true for inline block quotes or code blocks.
it shows a hyperlink for a # followed by any number, as well as any number with more than 6 digits: 1234567 and anything between brackets. But in the HTML export these are just normal text.

Most of these actually depend on the Markdown spec. Abricotine uses GFM most of the time, but it is not always consistent as you noticed.

In larger files, I tend to get a 'file updated' warning when Auto Saving enabled.
In larger files, when scrolling I get white areas instead of the text.

Those deserve their own issues with a proper description to help us to reproduce the bad behavior. But honestly don't spend to much time on it, because I think Abricotine is going to be discontinued some day.

You wrote 'I think Abricotine is going to be discontinued some day.' Why is that?

Please read #310.

The problem is with the first spaces in the code block only. Please find the screenshot attached, in the screenshot there is the same amount of spaces on both lines.

There is no image attached.

I did read and try this before filing this report, as adding @.***: 80%;or.editor-code() {font-size:80%;} doesn't change anything.

.CodeMirror-lines span:not(.cm-m-markdown):not(.cm-m-null):not(.cm-formatting).cm-variable {
  font-size:80%;
}

It's CodeMirror CSS which is a bit difficult to read and use. It is helpful to inspect the DOM with the hotkey F12.

Can you please try this:

  1. Menu "Edit" > "Open Config Directory"
  2. Create a backup of this directory in a safe location of your HDD.
  3. Exit Abricotine.
  4. Start it again with the following command :
abricotine --reset

Your configuration will be erased (which is why you have to create a backup before this step).

  1. Check if the issue was solved.