Re: [O] bug report: ox-html with coderef links needs a space between attributes in element (with patch)
Nicolas Goaziou twisted the bytes to say: >> >> I am running version 9.0.3 of org. >> >> I believe this patch will solve the issue. It simply adds a space before >> the class attribute. Nicolas> It works but I eventually applied a slightly different patch. Thank you Nicolas> for both the report and the patch. thank you very much! --daniel Nicolas> Regards, Nicolas> -- Nicolas> Nicolas Goaziou -- Daniel M. German "For indeed who is there alive that will not be swayed by his bias and partiality to Jonathan Swift -> the place of his birth?" http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .
Re: [O] bug report: ox-html with coderef links needs a space between attributes in element (with patch)
Hello, dmg writes: > I have the following org-snippet: > > --- > This is an example > > #+BEGIN_SRC sml -r -l "(*(ref:%s)*)" -n > val x = 1 > fun f y = x + y (*(ref:f)*) > val x = 2 > val y = 3 > val z = f(x+y) (*(ref:callf)*) > #+END_SRC > > - Line [[(f)]] defines a function that, when called, evaluates body *x+y* > in environment where *x* maps to *1* and *y* maps to the argument > -- > The HTML that it generates creates invalid HTML (one parser used by my > university refuses to accept it :) > > I have inspected the code and this is where it fails: Note how there is no > space between " and class in the element: > > > Line onmouseover="CodeHighlightOn(this, 'coderef-f');" > onmouseout="CodeHighlightOff(this, 'coderef-f');">2 defines a function > that, when called, evaluates body x+y > in environment where x maps to 1 and y maps to the > argument > > > I am running version 9.0.3 of org. > > I believe this patch will solve the issue. It simply adds a space before > the class attribute. It works but I eventually applied a slightly different patch. Thank you for both the report and the patch. Regards, -- Nicolas Goaziou
[O] bug report: ox-html with coderef links needs a space between attributes in element (with patch)
Hi everybody, I have the following org-snippet: --- This is an example #+BEGIN_SRC sml -r -l "(*(ref:%s)*)" -n val x = 1 fun f y = x + y (*(ref:f)*) val x = 2 val y = 3 val z = f(x+y) (*(ref:callf)*) #+END_SRC - Line [[(f)]] defines a function that, when called, evaluates body *x+y* in environment where *x* maps to *1* and *y* maps to the argument -- The HTML that it generates creates invalid HTML (one parser used by my university refuses to accept it :) I have inspected the code and this is where it fails: Note how there is no space between " and class in the element: Line 2 defines a function that, when called, evaluates body x+y in environment where x maps to 1 and y maps to the argument I am running version 9.0.3 of org. I believe this patch will solve the issue. It simply adds a space before the class attribute. diff --git a/lisp/ox-html.el b/lisp/ox-html.el index a741142..9b40cc9 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -3058,7 +3058,7 @@ INFO is a plist holding contextual information. See (let ((fragment (concat "coderef-" (org-html-encode-plain-text path (format "%s" fragment - (format "class=\"coderef\" onmouseover=\"CodeHighlightOn(this, \ + (format " class=\"coderef\" onmouseover=\"CodeHighlightOn(this, \ '%s');\" onmouseout=\"CodeHighlightOff(this, '%s');\"" fragment fragment) attributes -- --dmg --- Daniel M. German http://turingmachine.org