emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] How to get === on a line by itself to be a special string


From: Samuel Wales
Subject: [O] How to get === on a line by itself to be a special string
Date: Sat, 9 Feb 2013 22:16:28 -0700

I want separators like this:

===

to be treated as a special string in HTML.  This was the
case in the old exporter.

org-html-special-string-regexps is a variable defined in `ox-html.el'.
Its value is (("^-----$" . "<hr/>")
 ("---\\([^-]\\|$\\)" . "&mdash;\\1")
 ("--\\([^-]\\|$\\)" . "&mdash;\\1")
 ("^===$" . "<hr width=\"10%\"
style=\"width:10%;color:#000;background-color:#000;height:1px;border:none\"
/>")
 ("\\\\-" . "&shy;")
 ("---\\([^-]\\)" . "&mdash;\\1")
 ("--\\([^-]\\)" . "&ndash;\\1")
 ("\\.\\.\\." . "&hellip;"))

I don't want them to be interpreted as code.  I don't want
to turn off all code just to get this one thing to work.  I don't want
to do ~===~.

Does this mean some filter has to be used?

This did not work.

(add-to-list 'org-export-filter-code-functions
       (lambda (text back-end &rest _rest)
         (if (eq back-end 'html)
             (replace-regexp-in-string "^===$" "~===~" text)
           text)))

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]