Carsten Dominik <carsten.domi...@gmail.com> writes: > Hi Sebastian, > > I need to ask: > > What exactly are we changing? just the class names? of the id and names as > well? Will links have to be changed?
We are changing the values of the `id' attributes inside html tags. - in headlines (<h3 id="sec-HERE" ...> and similar) - in the containers <div id="outline-container-HERE" ... and <div class="outline-text-3" id="text--HERE" ... - and thus the links in the table-of-contents: <li><a href="#sec-HERE">1.2.1 Every HERE was e.g. `1.2.1' and will be from now on `1_2_1'. I'm not aware of any other cases, the XHTML-exporter creates IDs with dots. The *custom IDs are not meant to break*, so I'd be glad for everyone to have an eye on this. Also, this change will *not* affect any of the default styles set by Org-mode's exporter. Cases where users stylesheets are affected by this change will be _very_ rare for obvious reasons: One would have to use a slightly odd CSS-selector to match an element by (illegal) id="sec-1.2.1". Best wishes Sebastian > > - Carsten > > On Apr 24, 2010, at 1:25 PM, Sebastian Rose wrote: > >> Hi everyone, >> >> >> here's a patch for org-html.el to fix those IDs. >> >> sec-1.2 => sec-1_2 >> sec-1.2.3 => sec-1_2_3 >> >> >> >> >> diff --git a/lisp/org-html.el b/lisp/org-html.el >> index 71f62eb..133bffa 100644 >> --- a/lisp/org-html.el >> +++ b/lisp/org-html.el >> @@ -871,7 +871,9 @@ lang=\"%s\" xml:lang=\"%s\"> >> t t line))) >> (while (string-match >> "<\\(<\\)+\\|>\\(>\\)+" txt) >> (setq txt (replace-match "" t t txt))) >> - (setq href (format "sec-%s" snumber)) >> + (setq href >> + (replace-regexp-in-string >> + "\\." "_" (format "sec-%s" snumber))) >> (setq href (or (cdr (assoc href >> org-export-preferred-target- >> alist)) href)) >> (push >> (format >> @@ -2085,8 +2087,11 @@ When TITLE is nil, just close all open levels." >> " " title))) >> (unless (= head-count 1) (insert "\n</div>\n")) >> (setq href (cdr (assoc (concat "sec-" snumber) org-export-preferred- >> target-alist))) >> - (setq suffix (or href snumber)) >> - (setq href (or href (concat "sec-" snumber))) >> + (setq suffix (or href >> + (replace-regexp-in-string "\\." "_" snumber))) >> + (setq href (or href >> + (replace-regexp-in-string >> + "\\." "_" (concat "sec-" snumber)))) >> (insert (format "\n<div id=\"outline-container-%s\" class=\"outline- >> %d%s\">\n<h%d id=\"%s\">%s%s</h%d>\n<div class=\"outline-text-%d\" >> id=\"text-%s\">\n" >> suffix level (if extra-class (concat " " extra-class) >> "") >> level href >> >> >> >> >> Who ever uses org-info.js will have to pull the new (but backward >> compatible) version from >> >> http://orgmode.org/worg/code/org-info-js/org-info.js >> >> provided this or something similar gets applied. Please give the server >> a while to run the publishing before downloading (I guess 2 hours are >> enough). It's now ... >> >> >> $ date -u >> Sa 24. Apr 11:13:26 UTC 2010 >> >> >> >> >> Best wishes >> >> Sebastian > > - Carsten > > _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode