marshallward / vim-restructuredtext

Syntax file for reStructuredText on Vim.
26 stars 12 forks source link

Add bold + italic syntax #47

Closed ObserverOfTime closed 4 years ago

ObserverOfTime commented 4 years ago

Text that's both bold and italic (***bold + italic***) is neither matched as rstEmphasis nor rstStrongEmphasis.

I'm using NVIM v0.4.3.

marshallward commented 4 years ago

Nested inline markups are not supported by reST, so this is rendering correctly, even though it's not necessarily intuitive.

It's a known limitation of reST that is often raised but I don't know of any plans to address the problem anytime soon.

One way to interpret the roles is not as "italic" and "bold" but "emphasis" and "strong emphasis", which you can stylise how ever you like, via CSS for example. It's also possible to introduce new user-defined roles, although it does become less readable.

ObserverOfTime commented 4 years ago

Oh, I was under the impression it was supported.

marshallward commented 4 years ago

There does seem to be a typo, in that ***italic + bold*** ought to render the *italic + bold* part as bold, treating the inner *s as just another characters. Not very useful, but for the sake of correctness I'll see if I can get it to render properly.