Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed May 22, 2024
1 parent c5e3ee9 commit 8feb98e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
8 changes: 0 additions & 8 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -370,24 +370,16 @@ for top-level headings in =TODO= and =DONE= states.
For example:

- if =:done= is 0, then level-1 headings in =DONE= state are not
#+begin_example
shown at all
#+end_example

- if =:done= is 1, then level-1 headings in =DONE= state are shown
#+begin_example
"collapsed", i.e. org heading is generated, but without table
#+end_example

- if =:done= is 2, then level-1 headings in =DONE= state are shown
#+begin_example
and each has a table with its level-2 children
#+end_example

- if =:done= is 3, then level-1 headings in =DONE= state are shown
#+begin_example
and each has a table with its level-2 and level-3 children
#+end_example

...and so on. Same applies to =:todo= parameter.

Expand Down
16 changes: 11 additions & 5 deletions om-dash.el
Original file line number Diff line number Diff line change
Expand Up @@ -1396,12 +1396,18 @@ and 'org-done-keywords', but you can set them to your own values."
;; wrap indented code blocks
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^ " nil t)
(while (re-search-forward "^ \\|^ +-" nil t)
(beginning-of-line)
(insert "#+begin_example\n")
(while (looking-at "^ ")
(forward-line))
(insert "#+end_example\n")))
(if (looking-at "^ +-")
;; if this is a list item, skip it
(while (looking-at "^ \\|^ +-")
(forward-line))
(progn
;; otherwise, assume it's a code block
(insert "#+begin_example\n")
(while (looking-at "^ ")
(forward-line))
(insert "#+end_example\n")))))
;; re-align tables
(save-excursion
(goto-char (point-min))
Expand Down

0 comments on commit 8feb98e

Please sign in to comment.