• Hi everyone!

    I’m trying to switch from Syntactic Highlighter Evolve to something better and niecier. Plus I’d like to have an ability to use Markdown ` symbols for coloring of inline code and code blocks.</p> <p>Enlighter does its work with code blocks (that are surroned with `) very well but have problems with inline code.

    The problem is that it moves the inline code to a new line just adding <p></p> or closing </p> between the previous text and the inline code:

    <div class="entry-content">
    <p>Next will be the inline code </p>
    <div class="enlighter-default enlighter-v-inline enlighter-t-enlighter enlighter-l-raw "><span class="enlighter"><span class="enlighter-text">this is inline code</span></span></div><code data-enlighter-language="raw" class="EnlighterJSRAW enlighter-origin">this is inline code</code>

    How to fix this issue? I’d like to have my inline code inline with the rest of the text.

Viewing 5 replies - 1 through 5 (of 5 total)
  • In my website this was working until the latest update of the Enlighter plugin (this week), now my site is broken as you describe. So this is a major “regression” bug that hopefully will be quickly fixed.

    I raised an issue in GitHub about this. Fingers crossed. I have been using the plugin for many years now and not been affected by problems like this before. It has been working very nicely across many versions of WordPress.

    Thread Starter kvv213

    (@kvv213)

    Add my voice to the GitHub issue.

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    thanks for your reports! it’s a side effect of a required bugfix regarding the wpautop filter and the internal “placeholder” workaround to keep the code immutable. your html code is changed by wpauto and not Enlighter ??

    Generally this issue only affects the compatibility mode and markdown style inline blocks – you can easily downgrade to v4.5.0 or revert the following commit: https://github.com/EnlighterJS/Plugin.WordPress/commit/6ed5d71032d477bf5f5f25733a9b6649e04a7f0b

    This commit adds a “pre” wrapper tag around the placeholders, which allows wpautop to recognize the content as pre-codeblock. And yes this causes your issues because now a “block” element is assumed by wpautop.

    Technically the solution will take some time because it doesn’t make sense to revert the commit which previously breaks all block codeblocks (much more needed..) within the mentioned modes. I’ve to “split” all filters for specific block+inline wrappers.

    Gutenberg and TinyMCE should work as expected. You can read the followups on GitHub: https://github.com/EnlighterJS/Plugin.WordPress/issues/363#issuecomment-1387380557

    sry guys

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    should be fixed in v4.6.1

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inline backtics code without moving to a new line’ is closed to new replies.