youknowriad / averroes

A Gutenberg compatible markdown editor. Write in Markdown, edit in Markdown and preview in HTML.
https://wordpress.org/plugins/averroes
GNU General Public License v2.0
15 stars 3 forks source link

Impossible to save in Markdown tab #2

Open gregoirenoyelle opened 6 years ago

gregoirenoyelle commented 6 years ago

Hi !

The save button stop working in Markdown tab.

Here is the message in the console:

index.js:1 Uncaught Error: expected one of '!', '*', '_', /[^\n\r*_[!]/, /\\([*_[]])/ at line 1 column 213, got '...[newsletter]...'
    at o.D.tryParse (index.js:1)
    at d (index.js:7)
    at n.value (index.js:7)
    at t.value (index.js:37)
    at Ea (load-scripts.php?load=wp-codemirror,code-editor,htmlhint,csslint,jshint:20)
    at Jc (load-scripts.php?load=wp-codemirror,code-editor,htmlhint,csslint,jshint:21)
    at HTMLTextAreaElement.<anonymous> (load-scripts.php?load=wp-codemirror,code-editor,htmlhint,csslint,jshint:22)

I run WordPress 4.9.7 and Version 1.1.0 of the plugin.

Thanks, Grégoire

youknowriad commented 6 years ago

Is it possible to have the markdown content producing this error?

gregoirenoyelle commented 6 years ago

Thanks Riad. What do you mean? I have used very simple Markdown content writting in a text file with Title (##) and list (*). When I edit the page, the button stay light. I can’t click on it.

youknowriad commented 6 years ago

Oh! I see indeed, I don't update the Gutenberg state until you click outside/unfocus of the editor because the persistence can be heavy CPU-wise so I don't trigger it on each key stroke.

I'll try to figure a way to at least "simulate" that there's a change while you're typing. In the meantime, you can click outside the editor and then the Button should become active.

gregoirenoyelle commented 6 years ago

Thanks. It works if I click outside for a smal content. But for this other one bigger, It do not work. gnart-wpa CSS Grid Unite de mesure.txt

I try to open the file in my brother but that’s weird. Here is the online version

youknowriad commented 6 years ago

These are probably two separate bugs, I'll take a look.

gregoirenoyelle commented 6 years ago

Thanks a lot Riad. Le 30 juil. 2018 à 17:37 +0200, Riad Benguella notifications@github.com, a écrit :

These are probably two separate bugs, I'll take a look. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

gregoirenoyelle commented 6 years ago

Hello @youknowriad Do you find the bug? I plane to write an article in french about Gutenberg and Markdown. Since 2009, I’m a big Markdown fan. Here is a post of 2011 : Publier des articles avec Markdown et synchroniser entre les différents supports. Merci ! Grégoire

youknowriad commented 6 years ago

I fixed one bug. When you images with empty "alts". The JavaScript error you're seeing can happen if my markdown parser doesn't support something, so it can have multiple reasons.

In the example you shared, I think it's because of the HTML used in markdown, I don't support that yet. But hopefully, I'll be able to add all those use-cases step by step.

We have some busy days in the Gutenberg front these days, so unfortunately, I don't have much time left for my projects :P but definitely something I'll circle back to.

gregoirenoyelle commented 6 years ago

Hi Riad Thanks a lot. I understand. Great to hear that you resolve the image tag bug. Cheers, Grégoire Le 10 août 2018 à 10:37 +0200, Riad Benguella notifications@github.com, a écrit :

I fixed one bug. When you images with empty "alts". The JavaScript error you're seeing can happen if my markdown parser doesn't support something, so it can have multiple reasons. In the example you shared, I think it's because of the HTML used in markdown, I don't support that yet. But hopefully, I'll be able to add all those use-cases step by step. We have some busy days in the Gutenberg front these days, so unfortunately, I don't have much time left for my projects :P but definitely something I'll circle back to. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.