-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiline bold, italic, code #58
Comments
|
Best thing I could come up with. It works for some cases (when there is empty line between begin and end it works), but very fragile -- you can easily end up having the rest of your buffer italic if This is italic starting from
|
I will park it for now, suggesting to not using multiline inline markup. |
Maybe this can work? They should replace the existing ones, I removed syn region asciidoctorBold matchgroup=Conceal start=/\m\*\*/ end=/\*\*\|\n\n/ contains=@Spell concealends
syn region asciidoctorBold matchgroup=Conceal start=/\m\%(^\|[[:punct:][:space:]]\@<=\)\*\ze[^* ].\{-}\S/ end=/\*\%([[:punct:][:space:]]\@=\|$\)\|\n\n/ contains=@Spell concealends
syn region asciidoctorItalic matchgroup=Conceal start=/\m__/ end=/__\|\n\n/ contains=@Spell concealends
syn region asciidoctorItalic matchgroup=Conceal start=/\m\%(^\|[[:punct:][:space:]]\@<=\)_\ze[^_ ].\{-}\S/ end=/_\%([[:punct:][:space:]]\@=\|$\)\|\n\n/ contains=@Spell concealends
syn region asciidoctorBoldItalic matchgroup=Conceal start=/\m\*\*_/ end=/_\*\*\|\n\n/ contains=@Spell concealends
syn region asciidoctorBoldItalic matchgroup=Conceal start=/\m\%(^\|[[:punct:][:space:]]\@<=\)\*_\ze[^*_ ].\{-}\S/ end=/_\*\%([[:punct:][:space:]]\@=\|$\)\|\n\n/ contains=@Spell concealends |
Thx, I will check today |
Not sure if it is possible to be exactly complient
|
There could be a If a variant is used, it could be limited to patterns with double This cannot be avoided I think, but it's a minor issue:
|
I made an attempt here https://github.com/mg979/vim-asciidoctor/blob/multiline_bolditalic/syntax/asciidoctor.vim It allows multiline bold/italics only in regular paragraphs. At least this is the intention. Edit: it seems to b very slow unfortunately. |
Thank you, will check it |
Ok. Do you think we should keep them |
I made it a bit faster I think. I don't know if there's a better (and acceptably fast) solution than the one I tried. To have multiline working would be good because otherwise bold/italics can break every time a paragraph is reformatted, but right now |
That is why actually I have decided to try to implement multilined bold/italic :) |
You can see the current differences here master...mg979:multiline_bolditalic I'll try to improve it when I'll have the time |
Thank again!, tried it, not sure about speed (I didn't feel it slow, but no real measurements were done :) ) Basically, introducing paragraph and other "blocks" is the way to go to more or less properly implement this. For now the issues are in gif:
|
Personally I would only allow them in regular paragraphs, not in lists/tables etc, it simplifies things. |
Ok
I have unix lineendings for all my docs (just doublechecked
Ok. |
Checking multiline from @mg979 Paragraphs probably should be aware of this Paragraph definition is too greedy? |
No empty lines should be between
*
The text was updated successfully, but these errors were encountered: