My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 371: Bold/italic not highlighted across linebreaks
2 people starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Feb 2013


Sign in to add a comment
 
Reported by charles....@gmail.com, Aug 31, 2012
What steps will reproduce the problem?
1. Create or enter a vimwiki file
2. Enter italic text, some of which spans multiple lines, e.g.,
<pre>
_one line_
_two
lines_
</pre>

What is the expected output? What do you see instead?
Both groups of text should be in italics, but only the first is.

What version of the product are you using? On what operating system?
The latest vimwiki from github (v2.0.1), on Debian.

Please provide any additional information below.
As a suggestion, I added the following two lines to the file `~/.vim/after/syntax/vimwiki.vim`:
{{{
syntax region italicTest start='\v<_\w' end='\v\w_>' skip='\v\\_'
highlight link italicTest Comment
}}}
When this file is present at the stated location, both single-line and multi-line italic regions are highlighted in the same way (here, as comments).

I don't intend this to solve the problem, merely to hint at how the bold/italic highlighting might be modified.
Aug 31, 2012
#1 charles....@gmail.com
Is there no syntax highlighting for issues?  Man, that's ugly... sorry!
Dec 30, 2012
Project Member #2 stu.andrews
Is this solution still working fine?  What about html generation - does it still work?  Anyone else tested this?

Dec 30, 2012
#3 dkhorn...@gmail.com
Just tried it, and it doesn't generate italic on the html for the two line "_", only for the single line. Also, on vim itself, instead of italic, highlighting is shown. So as the O.P. said, this doesn't solve the issue, only point in a possible direction...
Dec 31, 2012
Project Member #4 stu.andrews
I expect that this would add a significant amount of complexity to the code, in addition to slowing it down.

As an alternative, multi-line italicized text can be achieved with an HTML block environment , e.g. with div tags
Status: Accepted
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low
Jan 4, 2013
#5 ch...@google.com
My example highlights code instead of italicizing it just for illustration purposes.  If you want it to italicize text, try this:

syntax region italicTest start='\v<_\w' end='\v\w_>' skip='\v\\_'
highlight link italicTest VimwikiItalic

It should be fairly straightforward to make a similar fix for multiline bolded regions.

The reason I say it's not a final solution is because one has to consider issues such as syntax regions contained in other regions, interaction between bold and italic, etc.  I think the software maintainers are better suited to handle these complexities.
Feb 24, 2013
Project Member #6 tpospi...@gmail.com
The design decision to keep most of emphasis-like markup as inline-only is very sound. It limits the possible scope of those environments, which

* prevents the runaway environment breakage --- type {{{ on a new line in the middle of a wiki file to see it in action: everything after that line is suddenly "wrong", until you explicitly limit the scope by closing with }}}

* allows one to use _ * ` etc. for their literal values (provided you do not pair them up on the same line) - this is what makes wikis so simple to use, instead of having to learn some special escaping rules like in programming or other formal languages, just to be able to write a common character (e.g. "<" in HTML)

In essence, you are proposing to break a lot of things, and the only benefit is to be able to "more easily" italicize a larger portion of text - something that is almost never done by professional designers of books...  Besides, there is no limit on the line length in vim, so the one-line-only restriction for inline environments really does not prevent you from emphasizing an entire paragraph of text.
Status: WontFix
Mar 6, 2013
#7 ch...@google.com
I disagree with your reasoning, but I respect your design decision, and have decided not to pursue the matter.
Sign in to add a comment

Powered by Google Project Hosting