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

Improve inline src blocks #578

Merged
merged 4 commits into from May 20, 2022
Merged

Improve inline src blocks #578

merged 4 commits into from May 20, 2022

Conversation

kaushalmodi
Copy link
Owner

@kaushalmodi kaushalmodi commented Mar 2, 2022

@kaushalmodi
Copy link
Owner Author

kaushalmodi commented Mar 2, 2022

Leaving this PR in draft until there's a solution to the inline src block parsing issue reported at https://lists.gnu.org/r/emacs-orgmode/2022-03/msg00008.html.


Update (2022/05/20): Even with the above issue still in the latest Org stable as of today, there's probably no need to block this update.

@kaushalmodi kaushalmodi marked this pull request as ready for review May 20, 2022 13:12
@kaushalmodi kaushalmodi merged commit 1d42215 into main May 20, 2022
@kaushalmodi kaushalmodi deleted the improve-inline-src-blocks branch May 20, 2022 13:28
@kaushalmodi
Copy link
Owner Author

Org example

#+begin_export html
<style>
    code.inline-src.language-nim::before {
        color: initial;
        content: "「";
    }
    code.inline-src.language-nim::after {
        color: initial;
        content: "」";
    }
</style>
#+end_export

In Nim, src_nim[:exports code]{echo "hello"} will print
{{{results(/hello/)}}}.

Markdown output

<style>
    code.inline-src.language-nim::before {
        color: initial;
        content: "";
    }
    code.inline-src.language-nim::after {
        color: initial;
        content: "";
    }
</style>

In Nim, <code class="inline-src language-nim" data-lang="nim">echo "hello"</code> will print
_hello_.

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

Successfully merging this pull request may close these issues.

Code blocks exported from src_foo blocks know their language
1 participant