brrd / abricotine

Markdown editor with inline preview
GNU General Public License v3.0
2.63k stars 159 forks source link

v1.0.0 Linux XFCE Code block rendering #308

Closed Voorhoeve closed 2 years ago

Voorhoeve commented 2 years ago

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:

brrd commented 2 years ago

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.

Voorhoeve commented 2 years ago

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 😕 Yes you are right, I'm sorry. Please forget about the first and the last two issues. The first is a duplicate of #158 indeed (with the remark that I would like cursor-dependent change, not mouse-dependent). You wrote 'I think Abricotine is going to be discontinued some day.' Why is that?

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 ?

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.

abricotine

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 https://github.com/brrd/abricotine/blob/develop/docs/themes.md

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

Two inconsistencies between Abricotine and GFM that are worth fixing IMHO:

it doesn't require a whitespace after a # for headings, while it should.

Here, the live preview seems to be incorret, gfm specs state: 'The opening sequence of # characters must be followed by a space or by the end of line.'

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.

Here, the output seems to be incorrect, gfm specs states: 'An indented code block cannot interrupt a paragraph, so there must be a blank line between a paragraph and a following indented code block. (A blank line is not needed, however, between a code block and a following paragraph.)'

brrd commented 2 years ago

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.

Voorhoeve commented 2 years ago

abricotine

brrd commented 2 years ago

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).

5) Check if the issue was solved.