Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error in command `markdown-standalone' leads to the out-of-order html output. #14

Closed
galeo opened this issue Aug 27, 2015 · 1 comment

Comments

@galeo
Copy link
Contributor

galeo commented Aug 27, 2015

The code:

 (unless (markdown-output-standalone-p)
    (markdown-add-xhtml-header-and-footer output-buffer-name))
 (goto-char (point-min))

in https://github.com/jrblevin/markdown-mode/blob/master/markdown-mode.el#L4421-L4423 would lead to the out-of-order html output. The html content generated by markdown-command should be placed in the middle of the xhtml header and footer.

Here is the code fix:

(goto-char (point-min))
(unless (markdown-output-standalone-p)
  (markdown-add-xhtml-header-and-footer output-buffer-name))
@jrblevin
Copy link
Owner

Thanks—fixed in b462983.

csrhodes pushed a commit to csrhodes/markdown-mode that referenced this issue Sep 10, 2015
The test is broken prior to Emacs 24.5 due to Emacs bug #19102:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19102
emacs-mirror/emacs@b3910f

While this isn't a bug in the latest version of Emacs 24, it does impact
the version of Emacs 24 in e.g. the most recent long-term-support
distribution of Ubuntu (14.04; the emacs package for that provides Emacs
24.3).

Stephen Berman notes in the bug report (message jrblevin#14):

> The error occurs when the sexp `(= (char-after) ?\n)' in
> outline-move-subtree-down is evaluated at eob. This can happen either
> when calling outline-move-subtree-down on either of the last two
> subtrees, or when calling outline-move-subtree-up on the last subtree.

Failed to find an easy way to work around that in
markdown-mode-move-subtree-up, so this does not change that function.
Instead, it adjusts the test to avoid triggering that outline-mode bug.
It also changes the assertion about the test-markdown-subtree/move-up
to assert the contents of the error message instead of asserting that
the type of the error is 'user-error. That's because prior to the change
that fixed this bug in Emacs 24.5, the type of that error message was
simply 'error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants