Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a78111917f8a
Choose a base ref
...
head repository: getnikola/plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2a95cc21d996
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Aug 3, 2015

  1. fix bug: wrong translation of characters

    '<' '>' '&' characters in src-block are translated to HTML equivalents.
    lotabout committed Aug 3, 2015
    Copy the full SHA
    f280541 View commit details

Commits on Aug 13, 2015

  1. Merge pull request #98 from lotabout/master

    [orgmode] fix bug: wrong translation of characters
    ralsina committed Aug 13, 2015
    Copy the full SHA
    2a95cc2 View commit details
Showing with 10 additions and 1 deletion.
  1. +10 −1 v6/orgmode/init.el
11 changes: 10 additions & 1 deletion v6/orgmode/init.el
Original file line number Diff line number Diff line change
@@ -37,6 +37,15 @@


;;; Code highlighting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun org-html-decode-plain-text (text)
"Convert HTML character to plain TEXT. i.e. do the inversion of
`org-html-encode-plain-text`. Possible conversions are set in
`org-html-protect-char-alist'."
(mapc
(lambda (pair)
(setq text (replace-regexp-in-string (cdr pair) (car pair) text t t)))
(reverse org-html-protect-char-alist))
text)

;; Use pygments highlighting for code
(defun pygmentize (lang code)
@@ -104,7 +113,7 @@ contextual information."
(let ((lang (org-element-property :language src-block))
(code (org-html-format-code src-block info)))
(if nikola-use-pygments
(pygmentize lang code)
(pygmentize lang (org-html-decode-plain-text code))
code))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;