|
|
|
|
@ -1147,6 +1147,15 @@ page/container width. This could be either called a bug in Hugo, or |
|
|
|
|
the HTML limitation. |
|
|
|
|
|
|
|
|
|
A workaround is below.. *use line numbers too!*. |
|
|
|
|
****** Highlighting only 1 line |
|
|
|
|
******* Org source |
|
|
|
|
#+begin_src org :noweb yes |
|
|
|
|
<<src-block-hl-without-n-just-1-line>> |
|
|
|
|
#+end_src |
|
|
|
|
******* Output |
|
|
|
|
#+begin_src org :noweb yes :exports results :results output replace :eval yes |
|
|
|
|
<<src-block-hl-without-n-just-1-line>> |
|
|
|
|
#+end_src |
|
|
|
|
**** With line numbers *not* starting from 1 |
|
|
|
|
:PROPERTIES: |
|
|
|
|
:CUSTOM_ID: source-blocks-with-highlighting-with-linenums-not-starting-from-1 |
|
|
|
|
@ -5528,6 +5537,14 @@ So, for emacs version 25.0.50.1, this variable will be 25_0.") |
|
|
|
|
:PROPERTIES: |
|
|
|
|
:CUSTOM_ID: source-block-with-line-highlighting-examples |
|
|
|
|
:END: |
|
|
|
|
#+begin_src org :noweb-ref src-block-hl-without-n-just-1-line |
|
|
|
|
,#+begin_src emacs-lisp :hl_lines 2 |
|
|
|
|
(message "This is line 1") |
|
|
|
|
(message "This is line 2") |
|
|
|
|
(message "This is line 3") |
|
|
|
|
,#+end_src |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
#+begin_src org :noweb-ref src-block-hl-without-n |
|
|
|
|
,#+begin_src emacs-lisp :hl_lines 1,3-5 |
|
|
|
|
(message "This is line 1") |
|
|
|
|
|