Kaushal Modi
fc3af84907
Comment fix
7 years ago
Kaushal Modi
4c34d42267
Wrap verse blocks with <p class="verse"> .. </p>
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/281 .
7 years ago
Kaushal Modi
578fa8d5eb
Fix the case where there is whitespace before the special > in verse
...
Any whitespace before the special > char in verse block is now ignored
as expected.
Ref:
02f43722d2
7 years ago
Kaushal Modi
b31105a11e
Fix the escaping of \{ and \} for Blackfriday parsing to work
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/258 .
7 years ago
Kaushal Modi
7fb284ec4b
Cover a corner case for org-blackfriday--translate
7 years ago
Kaushal Modi
237ca04fc3
Do not export src-block string as "Code Snippet" if lang is not en
...
I have decided to keep the element strings in English in the link
anchors for now.
7 years ago
Kaushal Modi
70d7217461
Fix names of internal functions
7 years ago
Kaushal Modi
da0a1b76fd
Add new defcustom org-hugo-link-desc-insert-type
...
This defcustom defaults to nil to retain the old behavior.
Set this to t (in your config or .dir-locals.el) to prepend link
descriptions for tables, source blocks and figures with "Table", "Code
Snippet" and "Figure".
Fixes https://github.com/kaushalmodi/ox-hugo/issues/233 .
7 years ago
Kaushal Modi
20cafde8e2
Add internal variable org-blackfriday--org-element-string
...
Remove hard-coded bits of "Code Snippet", "Figure" and "Table"
strings. Now manage those strings from one place, in this new alist.
Ref: https://github.com/kaushalmodi/ox-hugo/issues/233#issuecomment-436404850
7 years ago
Kaushal Modi
ecac30a6f1
Remove unused info arg from ob--get-reference
...
This is continuation of the previous commit
676d931c0a .
7 years ago
Kaushal Modi
676d931c0a
Generate code/table/figure anchors of the form "prefix--NAME"
...
.. where NAME is the "#+name" as set in the Org source for that Org
element.
Earlier the anchors contained the code/table/figure ordinal instead
which would result is very non-permanent links.
Fixes https://github.com/kaushalmodi/ox-hugo/issues/234 .
7 years ago
Kaushal Modi
c211999a84
Make the table anchors more readable
...
- Fixes https://github.com/kaushalmodi/ox-hugo/issues/206 .
- Move org-hugo--get-reference from ox-hugo.el to
org-blackfriday--get-reference in ox-blackfriday.el.
- Minor code cleanup; remove commented out calls to
org-export-get-reference.
8 years ago
Kaushal Modi
cd839d60fd
Checkdoc fixes
8 years ago
Kaushal Modi
2f50f141ff
Workaround for Blackfriday issue 239 for example blocks too
...
- https://github.com/russross/blackfriday/issues/239
- https://github.com/kaushalmodi/ox-hugo/issues/57
8 years ago
Kaushal Modi
ad98ebf498
Workaround for Blackfriday bug in italicizing links with underscores
...
Replaces underscores with "%5F" (hex code for underscores) in
links (only of http, https, ftp and mailto type).
- Fixes https://github.com/kaushalmodi/ox-hugo/issues/170 .
Revert his commit once
https://github.com/russross/blackfriday/issues/278 gets fixed.
8 years ago
Kaushal Modi
704b6e963f
Optimize the details/summary code
8 years ago
Kaushal Modi
3896f2940b
Move the details Special Block parsing to ox-blackfriday
...
Change the open drawer attr_html syntax from "open" to ":open t" to
fit with general Org attr_html syntax.
Always insert a newline before/after the string wrapped by inline HTML
elements.
8 years ago
Kaushal Modi
2a762a453a
HTML validation and consistency edits: Ending HTML tags in spcl blks
...
Now, the ending </tag> or </div> inserted as part of special block
exports will have an empty newline before that closing tag.
8 years ago
Kaushal Modi
edf9c71fa3
Support Org center block
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/148 .
8 years ago
Kaushal Modi
480aa31fe1
Now "\\" at end of line forces a line break
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/147 .
8 years ago
Kaushal Modi
cc192426c7
Revert "Add blank line before the closing div tags; HTML5 validity"
...
This reverts commit 654dba0838 .
That commit wasn't the cleanest way to make the HTML valid. Actually
the HTML will never be valid because of the div hack.. I guess we just
live with it till Hugo/Blackfriday adds support for wrapping Markdown
elements in div tags.
8 years ago
Kaushal Modi
654dba0838
Add blank line before the closing div tags; HTML5 validity
...
Also update Special Blocks test with more valid HTML5 semantic element
examples.
8 years ago
Kaushal Modi
549adc0f4f
More escaping to get around LaTeX equation parsing in Blackfriday
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/138
8 years ago
Kaushal Modi
6679abdb8b
Use org-html--translate ("Listing N:", "Table N:", ..)
8 years ago
Kaushal Modi
a1fc78c070
Remove indentation from latex environment blocks
...
Add a test case for that.
Fixes https://github.com/kaushalmodi/ox-hugo/issues/128
8 years ago
Kaushal Modi
ad1b513c08
Lower case all Org keywords
...
Let there be:
#+options:
#+begin_src emacs-lisp
...
#+end_src
.. and so on.
Command used for this lower case conversion:
(defun modi/lower-case-org-keywords ()
"Lower case Org keywords and block identifiers.
Example: \"#+TITLE\" -> \"#+title\"
\"#+BEGIN_EXAMPLE\" -> \"#+begin_example\"
Inspiration:
13424336a6 ."
(interactive)
(save-excursion
(goto-char (point-min))
(let ((case-fold-search nil)
(count 0))
;; Match examples: "#+FOO ", "#+FOO:", "=#+FOO=", "~#+FOO~",
;; ",#+FOO ", "#+FOO_bar ", "#+FOO<eol>".
(while (re-search-forward "\\(?1:#\\+[A-Z_]+\\(?:_[[:alpha:]]+\\)*\\)\\(?:[ :=~’”]\\|$\\)" nil :noerror)
(setq count (1+ count))
(replace-match (downcase (match-string-no-properties 1)) :fixedcase nil nil 1))
(message "Lower-cased %d matches" count))))
8 years ago
Kaushal Modi
2ca387c64b
Support exporting (non-)hyperlinked inline images
...
- [X] Inlined non-hyperlinked images, no meta or only alt -- Use Markdown image syntax
- [X] Inlined hyperlinked images, no meta or only alt -- Use Markdown image syntax
- [X] Inlined non-hyperlinked images, meta other than alt -- Use HTML img
- [X] Inlined hyperlinked images, meta other than alt -- Use HTML img
https://github.com/kaushalmodi/ox-hugo/issues/125
8 years ago
Kaushal Modi
7cb82630ca
Optimize org-bf-latex-environment and org-bf-latex-fragment
...
Ref https://github.com/kaushalmodi/ox-hugo/issues/113
8 years ago
Kaushal Modi
5a62461f60
Update doc-string of org-blackfriday-item
...
Also untabify and auto-indent.
8 years ago
Kaushal Modi
972f8b7208
Support descriptive lists nested in other lists
...
This is a workaround for Blackfriday limitation, as there doesn't seem
to be a way to nest Blackfriday syntax descriptive/definition lists.
8 years ago
Kaushal Modi
cfaea8b0a2
Export descriptive lists in the style supported by blackfriday
...
https://discourse.gohugo.io/t/description-list-shortcode/9787/2?u=kaushalmodi
Fixes https://github.com/kaushalmodi/ox-hugo/issues/114
8 years ago
Kaushal Modi
3fd8f31db8
Support ATTR_HTML above plain lists
8 years ago
Kaushal Modi
a2d43f3beb
Support ATTR_HTML above quote blocks
8 years ago
Kaushal Modi
a5d5a91735
Support ATTR_HTML above source and example blocks
...
Ref https://github.com/kaushalmodi/ox-hugo/issues/113
8 years ago
Kaushal Modi
a0693783d7
Support Inline HTML5 element special blocks
...
Example: Use #+BEGIN_mark and #+END_mark to mark/highlight text in HTML5.
8 years ago
Kaushal Modi
8cc6b9a573
Support ATTR_HTML above paragraphs
...
Ref https://github.com/kaushalmodi/ox-hugo/issues/113
8 years ago
Kaushal Modi
e72e3236d4
Fix function name
...
.. should be org-blackfriday-.. in ox-blackfriday.el
8 years ago
Kaushal Modi
a2e9396771
Support exporting Org Special Blocks like ox-html
...
It works almost the same way as ox-html, but a little hack is add to
get around a Hugo/Blackfriday limitation that Markdown text cannot be
wrapped in HTML elements like div. Details:
https://github.com/kaushalmodi/ox-hugo/issues/93 .
Fixes https://github.com/kaushalmodi/ox-hugo/issues/105 .
8 years ago
Kaushal Modi
9d3da7e04d
Interpret --, ---, .. in source block and table captions
8 years ago
Kaushal Modi
31783919e8
Supporting specifying table HTML/CSS attributes
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/93
8 years ago
Kaushal Modi
ac92dad97a
Export table caption using HTML backend
...
.. because that caption is embedded in HTML div tags.
8 years ago
Kaushal Modi
735d6d29ed
Wrap table captions in div tags instead of caption
...
caption tags should not be used outside table tags -
https://www.w3schools.com/tags/tag_caption.asp
Because of the hugo/blackfriday limitation, we'll live with the table
caption staying in a plain div just before the table.
8 years ago
Kaushal Modi
71e1fdfda5
Export table captions
...
https://github.com/kaushalmodi/ox-hugo/issues/38
8 years ago
Kaushal Modi
3b6a0461bb
Don't double-escape # and ! chars
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/110
This actually fixes a bug in upstream ox-md.
8 years ago
Kaushal Modi
9f8cac054d
Move common logic to org-blackfriday-escape-chars-in-equation
8 years ago
Kaushal Modi
95dd1ea388
Support exporting Latex Environments from Org too
...
- org-blackfriday-latex-fragment: Escape * to \* in latex fragments
- org-blackfriday-latex-environment: New function, added to do the
escaping in latex environments (like \begin{align}..\end{align})
similar to that in latex fragments
- Add a new real world example, thanks to @Vonng
- Update org-export-headline-levels to 4 (from default of 3) in test
setup.
8 years ago
Kaushal Modi
39be5829a9
Prevent Blackfriday/smartParens from running inside equations
...
Fixes https://github.com/kaushalmodi/ox-hugo/issues/104
8 years ago
Kaushal Modi
80cdaa2eca
Don't increase the number of backticks unnecessarily
...
A better version of the fix in
6198bbe01e
8 years ago
Kaushal Modi
6198bbe01e
Fix number of backticks in code fence when code contains code fence
8 years ago
Kaushal Modi
59acb59852
Support internal linking to tables by their block names
...
http://orgmode.org/manual/Images-and-tables.html
https://github.com/kaushalmodi/ox-hugo/issues/29
8 years ago