Skip to content

Commit

Permalink
Add a test for marking multiple lines in bold (any emphasis)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushalmodi committed Aug 29, 2017
1 parent 57c4b7d commit 19cbbc8
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
22 changes: 22 additions & 0 deletions example-site/content-org/all-posts.org
Expand Up @@ -501,6 +501,28 @@ Here =~C-h f~= will show up as =`C-h f`= in Markdown and then

Example:
- Few of Emacs help keybindings: ~C-h f~, ~C-h v~
** Multi-line bold
:PROPERTIES:
:EXPORT_FILE_NAME: multi-line-bold
:END:
*This works fine as the bold sentence does not include a newline.*

*This is a sentence that should render completely in bold. It is
broken across multiple lines (in Org source) because of
auto-filling. But that should not break the bold rendering. But it
does by default.*

If you do not see the above paragraph completely in bold, have below
in your emacs config to fix it:
#+BEGIN_SRC emacs-lisp :eval no
(with-eval-after-load 'org
;; Allow multiple line Org emphasis markup.
;; http://emacs.stackexchange.com/a/13828/115
(setcar (nthcdr 4 org-emphasis-regexp-components) 20) ;Up to 20 lines, default is just 1
;; Below is needed to apply the modified `org-emphasis-regexp-components'
;; settings from above.
(org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components))
#+END_SRC
* Example block :example:
** Simple
:PROPERTIES:
Expand Down
25 changes: 25 additions & 0 deletions example-site/content/posts/multi-line-bold.md
@@ -0,0 +1,25 @@
+++
title = "Multi-line bold"
tags = ["formatting"]
draft = false
+++

**This works fine as the bold sentence does not include a newline.**

**This is a sentence that should render completely in bold. It is
broken across multiple lines (in Org source) because of
auto-filling. But that should not break the bold rendering. But it
does by default.**

If you do not see the above paragraph completely in bold, have below
in your emacs config to fix it:

This comment has been minimized.

Copy link
@kaushalmodi

```emacs-lisp
(with-eval-after-load 'org
;; Allow multiple line Org emphasis markup.
;; http://emacs.stackexchange.com/a/13828/115
(setcar (nthcdr 4 org-emphasis-regexp-components) 20) ;Up to 20 lines, default is just 1
;; Below is needed to apply the modified `org-emphasis-regexp-components'
;; settings from above.
(org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components))
```

0 comments on commit 19cbbc8

Please sign in to comment.