-
Notifications
You must be signed in to change notification settings - Fork 17
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
Inline code after latest update inserts newlines before and after the inline code. #363
Comments
I also check with the Twenty-Twenty-Three theme and the problem persists. |
Have the same behaviour on the fresh installed plugin. 'this text' arose closing the paragraph </p> or adding two paragraph tags <p></p> |
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, inline shortcodes and markdown style inline blocks - you can easily downgrade to v4.5.0 or revert the following commit: 6ed5d71 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. sry guys |
@aphalo @SuperBoss9 can you confirm that only the mentioned editing modes are affected ? |
I didn't manage to find other issues with the inline code. Is it possible to add something like a feature that will change |
it much more complicated under the hood... technically the filters are extracting the codeblocks with a low wp_filter priority and restoring the content (converted to EnlighterJS codeblocks) with a high wp_filter priority. the extraction (placeholders are inserted) needs to be modified to detect inline content and wrap the placeholders selectively in code/pre tags temporarily to avoid wpautop issues. in previous versions (without a pre wrapper) all codeblocks were assumed as inline by wpautop - therefore you didn't experienced any issues but the markup was broken in case of block content |
@AndiDittrich I am not sure how the editor in use matters in this, except when writing a new post or page. At the moment this bug affects a couple of hundred existing posts in my website from the last several years. The html includes the backquotes as & scapes, as I made sure my settings would stop the editor from converting backquotes into |
see #351 for details why the "legacy" compatibility modes have changed. you can easily force the old (invalid) behaviour by reverting the commit mentioned above (replace one file) |
da0d8ea should fix the issue for gfm(markdown) and shortcodes - maybe someone give it a try changing the compatibility modes takes longer |
I just upgraded to 4.6.1. Is there some easy way to identify where on my site I used inline code?Maybe with the Search field on my posts list? This way I can confirm it looks OK for you. I don't remember when I last used inline you see. |
Just search via WP Editor search. Use symbols that are used in the
declarations of the code blocks. Like apostrophes or HTML tags like pre etc.
…--
Best wishes,
*Vladislav Kravchenko*
сб, 21 янв. 2023 г. в 11:04, ajtruckle ***@***.***>:
I just upgraded to 4.6.1. Is there some easy way to identify where on my
site I used inline code?Maybe with the Search field on my posts list? This
way I can confirm it looks OK for you. I don't remember when I last used
inline you see.
—
Reply to this email directly, view it on GitHub
<#363 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMZZBLJ2ZGNTEAP6UQ2G373WTOKB7ANCNFSM6AAAAAAT7GRU6A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think I have inline code on here in two places and it seems OK: https://www.publictalksoftware.co.uk/2018/05/s-89-slips-highlight-when-study-point-not-assigned/ |
in case your not using an Enlighter codeblock this is the expected behaviour of using markdown fenced codeblocks or shortcodes. |
Then it works :) |
Describe the bug
Inline code after latest update inserts newlines before and after the inline code.
See https://www.r4photobiology.info/2023/01/ggspectra-0-3-10/
WordPress Editing Mode
Which WordPress editing mode you're using ?
Advanced Editor Tools (previously TinyMCE Advanced)
Should be irrelevant, as preexisting pages in the whole site were broken. I haven't edited anything since the automatic plugin update.
Frontend or Backend Issue
frontend: page rendering
To Reproduce
Steps to reproduce the behavior:
See for example https://www.r4photobiology.info/2023/01/ggspectra-0-3-10/ and almost every other post at https://www.r4photobiology.info
Expected behavior
Inline code to the displayed in line.
Screenshots
If applicable, add screenshots to help explain your problem.
This should be a single paragraph with no line breaks.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Plugin configuration
The text was updated successfully, but these errors were encountered: