orgajs icon indicating copy to clipboard operation
orgajs copied to clipboard

newline breaks italic markup

Open hjiang opened this issue 6 years ago • 4 comments

I'm using Orga with GatsbyJS. I have the following in my post:

... or /The C++ Programming
Language/.

It is rendered as

... or /The C++ Programming Language/.

But if I remove the newline after Programming, it is correctly rendered as

... or The C++ Programming Language.

I suspect other formatting markup may be broken too.

hjiang avatar Jun 19 '19 12:06 hjiang

That is an expected behaviour. I know it works differently from org-mode, but it's a temporary compromise. We experience performance issues when doing inline parsing with large paragraphs. See details #6 , in order to properly resolve it, we have to write a real parser instead of relying on regex to do the magic. That's a big work, so for now I turned off multiline inline parsing, so any inline syntax has to be on one line.

xiaoxinghu avatar Aug 28 '19 00:08 xiaoxinghu

I think that that #47 nearly fixes this with some small chances to inline.ts. I'll commit those to my fork now.

gitonthescene avatar Jun 06 '20 23:06 gitonthescene

This seems to do it, with the rest of the changes in the fork.

gitonthescene avatar Jun 06 '20 23:06 gitonthescene

Support for this is added in #104. In terms of efficiency, #104 appears to be faster than the old implementation (that supported multi-line text markup), but of course I will keep looking at ways to ensure we don't incur extra cost. Search space is bounded (per the spec), so the regular expression doesn't currently need to check more than 2 lines.

GuiltyDolphin avatar Jul 18 '21 14:07 GuiltyDolphin