-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Nested shortcodes get rendered as Markdown #2173
Comments
I don't have the implementation details in my head now, but if you say this is how it is, then this is by design. Your obvious workaround here is to not use markdown in the outer wrapper. |
OK, this was it: I guess it is hard to make everyone happy. |
Could It seems to me like that wouldn't conflict with the normal behaviour of those symbols. |
No idea what you mean here, but the current definition of: {{<: The Inner content will not be passed through the markdown (or whatever) rendering engine This is how it behaves today. I understand what you want, but you haven't presented a solution to it, at least not one that I understand. |
You're right. It doesn't make sense. I mixed up inner content (which this particular shortcode) doesn't have) with the HTML output of the shortcode itself. It just goes to show that it's unintuitive for a shortcode to ever be rendered as anything but HTML. I do understand why you did it from your linked use case above. But I wish there were a way to avoid it. |
Me, too. And I will think about it. If you have any simple and good idea, please chime in. |
Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't. If this is a bug and you can still reproduce this error on the latest If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. |
I may be running into a similar situation: #5516 Would a reasonable solution be to add an option to Black Friday in the config to not pass nested shortcodes through the parser? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version: Hugo Static Site Generator v0.16-DEV BuildDate: 2016-05-27T20:32:19+02:00.
My post has two shortcodes, one that is nested:
The issue is that
retina.html
is rendered as Markdown. Line breaks in the template code are treated as<p>
tags, and other accidental Markdown syntax is parsed.I get that the
%
sign means "render the insides as Markdown," but it shouldn't apply to internal shortcodes, which are HTML files and usually treated as such, even when they're invoked from Markdown content.Otherwise, it's very difficult to mix Markdown and shortcodes inside another shortcode without running into formatting glitches.
The text was updated successfully, but these errors were encountered: