bobbingwide / oik-css

[bw_css] shortcode for internal CSS styling
https://www.oik-plugins.com/oik-plugins/oik-css
0 stars 0 forks source link

[bw_geshi] - Do not eliminate p and br tags when lang=html or html5 #7

Closed bobbingwide closed 6 years ago

bobbingwide commented 6 years ago

For the [bw_geshi] shortcode when the lang= parameter is a certain value we need to undo some of the processing performed by other filters attached to the_content. For some languages this means eliminating unwanted paragraphs and breaks.

This is not the case for html and html5.

We also have ‘none’, which is intended for formatting examples of shortcodes.

Expected output

<p>What happens <b>here</b>?</p>

Actual output

What happens <b>here</b>?

Notes:

Proposed solution

Note: It may be necessary to revisit the hooks attached to the_content and other places where the shortcode may be expanded. Basically, we don’t want any wpautop logic applied to the content between [bw_geshi] and [/bw_geshi].

bobbingwide commented 6 years ago

Note: The tests are currently dependent upon oik-ajax being activated. A change to oik-ajax will help remove this dependency. See https://github.com/bobbingwide/oik-ajax/issues/1

bobbingwide commented 6 years ago

The code’s been developed. The examples are not yet on oik-plugins.com. They’ll need to be cloned from the local development when the new version is available.