Jump to content

Markup Regions with HTML Comments


aagd
 Share

Recommended Posts

Is there any way of keeping HTML comments in content rendered via Markup Regions? Per default all comments seem to get filtered out (Why this?). There is a forum thread touching this topic but it doesn't answer how to get the comments back.  I found in 'wire/core/WireMarkupRegions.php' there seems to be an option "exact" with is explained as:

Quote

exact (bool): Return region markup exactly as-is? (default=false). Specify true when using return values for replacement.

but I'm not sure if that's what I need. At least changing the default value in wire, doesn't seem to make any difference. I also found that comments starting with a hash symbol will be kept intact, like

<!--#Test -->

but those are actually intended as Markup Region Hints so it might affect performance to use them as regular comments!?

  • Like 1
Link to comment
Share on other sites

It doesn't look like there is a way to keep HTML comments intact when using the core Markup Regions feature. Even if there was a way to set the "exact" option you mentioned (which there isn't currently because the Markup Regions methods aren't hookable), comments are also removed here.

You could make a feature request at GitHub for an option to keep HTML comments.

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...