emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* No explicit way to add blank lines to the beginning or end of example or source blocks
@ 2017-04-06  6:27 Li DebugFan
  2017-04-29 12:34 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Li DebugFan @ 2017-04-06  6:27 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

No explicit way to add blank lines to the beginning or end of example or
source blocks.
For example: describing HTTP header:
-------------------------------------------------------------------
HTTP header consists of colon-separated name-value pairs,
and terminated by a CRLF character sequence, e.g.:
#+BEGIN_EXAMPLE
GET / HTTP/1.1
Host: www.example.com

#+END_EXAMPLE
This is line break at the end of HTTP header.
-------------------------------------------------------------------
But the blank line at end of example block is not exported, and neither in
src block,
I check the source, and found it maybe because of the function
`org-split-string',
its description as follow:
(defun org-split-string (string &optional separators)
  "Splits STRING into substrings at SEPARATORS.
No empty strings are returned if there are matches at the beginning
and end of string."
  ...)
It means `org-split-string' will ignore all blank lines at the beginning
and the end,
but what if I need some blank lines in the beginning or the end?

[-- Attachment #2: Type: text/html, Size: 1347 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: No explicit way to add blank lines to the beginning or end of example or source blocks
  2017-04-06  6:27 No explicit way to add blank lines to the beginning or end of example or source blocks Li DebugFan
@ 2017-04-29 12:34 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-04-29 12:34 UTC (permalink / raw)
  To: Li DebugFan; +Cc: emacs-orgmode

Hello,

Li DebugFan <debugfanli@gmail.com> writes:

> No explicit way to add blank lines to the beginning or end of example or
> source blocks.
> For example: describing HTTP header:
> -------------------------------------------------------------------
> HTTP header consists of colon-separated name-value pairs,
> and terminated by a CRLF character sequence, e.g.:
>
> #+BEGIN_EXAMPLE
> GET / HTTP/1.1
> Host: www.example.com
>
> #+END_EXAMPLE
>
> This is line break at the end of HTTP header.
> -------------------------------------------------------------------
> But the blank line at end of example block is not exported, and neither in
> src block,
> I check the source, and found it maybe because of the function
> `org-split-string',
> its description as follow:
> (defun org-split-string (string &optional separators)
>   "Splits STRING into substrings at SEPARATORS.
> No empty strings are returned if there are matches at the beginning
> and end of string."
>   ...)
> It means `org-split-string' will ignore all blank lines at the beginning
> and the end,
> but what if I need some blank lines in the beginning or the end?

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-29 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06  6:27 No explicit way to add blank lines to the beginning or end of example or source blocks Li DebugFan
2017-04-29 12:34 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).