[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/>")
("---\\([^-]\\|$\\)" . "—\\1")
("--\\([^-]\\|$\\)" . "—\\1")
("^===$" . "<hr width=\"10%\"
style=\"width:10%;color:#000;background-color:#000;height:1px;border:none\"
/>")
("\\\\-" . "­")
("---\\([^-]\\)" . "—\\1")
("--\\([^-]\\)" . "–\\1")
("\\.\\.\\." . "…"))
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.
- [O] How to get === on a line by itself to be a special string,
Samuel Wales <=