Hi Marshall,

Am So., 16. Mai 2021 um 01:20 Uhr schrieb Marshall Ward
<[email protected]>:
>
> I believe that many of these cases have been resolved in the development 
> branch, which may not have been sent to the main repository yet 
> (https://github.com/marshallward/vim-restructuredtext)
>
> I tested your inline markup examples and I am seeing some issues with dashes 
> (`-`) but the underscore and slash delims appear to be correct.
>
> There is a fixed list of characters which are allowed to follow the end of an 
> inline markup.  It appears that slash `/` is on this list but dash `-` is 
> missing and is not being handled correctly.  Underscore `_` is not allowed to 
> follow and end-inline.
>
> For example, in rst2html:  *hello*_*foobar* highlights as a single italic, 
> <em>hello*_*foobar</em>.
>
> There are similar requirements for the start of an inline highlight.  Again, 
> dash and slash are permitted but underscore is not.
>
> I will try to resolve this in the vim-restructuredtext repo and then send a 
> patch over to Vim.

That's great.

Attached you find some small exploration of the behaviour of
``rst2html``.  This behaviour might be seen as authoritative.  After
having written that small document, I looked up the syntax description
upstream, and found
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#inline-markup,
which might be used to synchronise the rendering within vim with the
upstream specification?

>From what you've written I understand that there already is some code
implementing that there are sets of characters allowed to
precede/follow inline markup strings like ``*`` or ``**``, so
hopefully the dash issue won't be too difficult to resolve?

Best,
Friedrich

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAN06%3DCzMS16w7512TGf0vSjcOphKKGY1Cxa%2BNWpQAytGvf-Ukg%40mail.gmail.com.
Title: Behaviour of rst2html (docutils-0.16)

Behaviour of rst2html (docutils-0.16)

Date: 17 May 2021
Author: Friedrich Romstedt
License:CC-BY 4.0
ReST markup ReST rendering HTML extract
.
*hello*-*foobar* hello-foobar <em>hello</em>-<em>foobar</em>
*hello*_*foobar* hello*_*foobar <em>hello*_*foobar</em>
*hello*/*foobar* hello/foobar <em>hello</em>/<em>foobar</em>
.
**hello**-**foobar** hello-foobar <strong>hello</strong>-<strong>foobar</strong>
**hello**_**foobar** hello**_**foobar <strong>hello**_**foobar</strong>
**hello**/**foobar** hello/foobar <strong>hello</strong>/<strong>foobar</strong>
.
-*foobar* -foobar -<em>foobar</em>
_*foobar* _*foobar* _*foobar*
/*foobar* /foobar /<em>foobar</em>
.
-**foobar** -foobar -<strong>foobar</strong>
_**foobar** _**foobar** _**foobar**
/**foobar** /foobar /<strong>foobar</strong>
.
*hello*- hello- <em>hello</em>-
*hello*_ (syntax error)  
*hello*/ hello/ <em>hello</em>/
.
**hello**- hello- <strong>hello</strong>-
**hello**_ (syntax error)  
**hello**/ hello/ <strong>hello</strong>/

Raspunde prin e-mail lui