Org writer: stop indenting property drawers, quote blocks
This follows the current default org-mode behavior. Closes: #3245
This commit is contained in:
parent
a7d94dba43
commit
168529f0a4
2 changed files with 122 additions and 115 deletions
|
@ -146,7 +146,7 @@ blockToOrg (Header level attr inlines) = do
|
|||
let headerStr = text $ if level > 999 then " " else replicate level '*'
|
||||
let drawerStr = if attr == nullAttr
|
||||
then empty
|
||||
else cr <> nest (level + 1) (propertiesDrawer attr)
|
||||
else cr <> propertiesDrawer attr
|
||||
return $ headerStr <> " " <> contents <> drawerStr <> cr
|
||||
blockToOrg (CodeBlock (_,classes,kvs) str) = do
|
||||
let startnum = maybe "" (\x -> " " <> trimr x) $ lookup "startFrom" kvs
|
||||
|
@ -163,7 +163,7 @@ blockToOrg (CodeBlock (_,classes,kvs) str) = do
|
|||
blockToOrg (BlockQuote blocks) = do
|
||||
contents <- blockListToOrg blocks
|
||||
return $ blankline $$ "#+begin_quote" $$
|
||||
nest 2 contents $$ "#+end_quote" $$ blankline
|
||||
contents $$ "#+end_quote" $$ blankline
|
||||
blockToOrg (Table _ blkCapt specs thead tbody tfoot) = do
|
||||
let (caption', _, _, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot
|
||||
caption'' <- inlineListToOrg caption'
|
||||
|
|
|
@ -75,6 +75,7 @@ E-mail style:
|
|||
|
||||
#+begin_quote
|
||||
This is a block quote. It is pretty short.
|
||||
|
||||
#+end_quote
|
||||
|
||||
#+begin_quote
|
||||
|
@ -95,11 +96,14 @@ E-mail style:
|
|||
|
||||
#+begin_quote
|
||||
nested
|
||||
|
||||
#+end_quote
|
||||
|
||||
#+begin_quote
|
||||
nested
|
||||
|
||||
#+end_quote
|
||||
|
||||
#+end_quote
|
||||
|
||||
This should not be a block quote: 2 > 1.
|
||||
|
@ -341,6 +345,7 @@ Multiple blocks with italics:
|
|||
|
||||
#+begin_quote
|
||||
orange block quote
|
||||
|
||||
#+end_quote
|
||||
|
||||
Multiple definitions, tight:
|
||||
|
@ -748,6 +753,7 @@ An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]]
|
|||
|
||||
#+begin_quote
|
||||
Blockquoted: [[http://example.com/]]
|
||||
|
||||
#+end_quote
|
||||
|
||||
Auto-links should not occur here: =<http://example.com/>=
|
||||
|
@ -781,6 +787,7 @@ note.[fn:3]
|
|||
|
||||
#+begin_quote
|
||||
Notes can go in quotes.[fn:4]
|
||||
|
||||
#+end_quote
|
||||
|
||||
1. And in list items.[fn:5]
|
||||
|
|
Loading…
Add table
Reference in a new issue