emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to get === on a line by itself to be a special string
@ 2013-02-10  5:16 Samuel Wales
  2013-02-10  9:01 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2013-02-10  5:16 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-12 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-10  5:16 How to get === on a line by itself to be a special string Samuel Wales
2013-02-10  9:01 ` Nicolas Goaziou
2013-02-12 19:02   ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).