Merge pull request #285 from MichaelThessel/dev

Added config option to allow for newlines in text when exporting to HTML
This commit is contained in:
EinfachToll 2017-01-30 20:43:26 +01:00 committed by GitHub
commit be79f68a92
3 changed files with 19 additions and 1 deletions

View File

@ -983,7 +983,11 @@ function! s:process_tag_para(line, para) "{{{
let para = 1 let para = 1
endif endif
let processed = 1 let processed = 1
if g:vimwiki_text_ignore_newline == 1
call add(lines, a:line) call add(lines, a:line)
else
call add(lines, a:line."<br />")
endif
elseif para && a:line =~# '^\s*$' elseif para && a:line =~# '^\s*$'
call add(lines, "</p>") call add(lines, "</p>")
let para = 0 let para = 0

View File

@ -2302,6 +2302,19 @@ Value Description~
Default: 1 Default: 1
------------------------------------------------------------------------------
*g:vimwiki_text_ignore_newline*
This is HTML related.
Convert newlines to <br />s in text.
Value Description~
0 Newlines in text are converted to <br />s.
1 Ignore newlines.
Default: 1
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*g:vimwiki_use_calendar* *g:vimwiki_use_calendar*

View File

@ -369,6 +369,7 @@ call s:default('ext2syntax', {}) " syntax map keyed on extension
call s:default('hl_headers', 0) call s:default('hl_headers', 0)
call s:default('hl_cb_checked', 0) call s:default('hl_cb_checked', 0)
call s:default('list_ignore_newline', 1) call s:default('list_ignore_newline', 1)
call s:default('text_ignore_newline', 1)
call s:default('listsyms', ' .oOX') call s:default('listsyms', ' .oOX')
call s:default('use_calendar', 1) call s:default('use_calendar', 1)
call s:default('table_mappings', 1) call s:default('table_mappings', 1)