-
Notifications
You must be signed in to change notification settings - Fork 6
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 HTML tag <p> ignored within lists #27
Comments
Hi: I'm not sure about how you have tried this, but it works as expected. If I use the exact code you have pasted above and I render a page with MIIS i get the expected result and HTML: <p>First Paragraph</p><p>Second Paragraph</p>
<ul>
<li>Item 1<p>First Paragraph in List Item 1</p>
<p>Second Paragraph in List Item 1</p>
</li>
<li>Item 2 <p>First Paragraph in List Item 2</p> <p>Second Paragraph in List Item 2</p></li>
</ul> and it's rendered this way: So everything works as expected. I'm attached the sample file I've used, pasted from your message. Please, attach a ZIP with a sample of the issue (everythinh included: template used, bin folder...) so that I can see exactly what's happening. Cheers. |
Hi, <article class="article">
<div class="wrapper miis-content">
<p>First Paragraph</p><p>Second Paragraph</p>
<ul>
<li>Item 1<p>First Paragraph in List Item 1</p>
<p>Second Paragraph in List Item 1</p>
</li>
<li>Item 2 <p>First Paragraph in List Item 2</p> <p>Second Paragraph in List Item 2</p></li>
</ul>
<aside class="copyright" role="note">
<hr/>
© Jose M. Alarcon - 2017 - Powered by MIIS
</aside> Attached is the zip file that contains the original miis package and additional 2 md files on top level (paragraph.md and test.md). |
Hi again: This is working as expected. The problem is not with the resulting HTML, is that this specific template you're using has a style to force certain paragraphs as inline elements, as you can see here: Normally a paragraph inside a list element doesn't make a lot of sense, so in this specific template's CSS makes them inline elements. On the other hand, Why would you use this kind of simple HTML inside markdown? I mean, if you need a paragraph just create a new line in the markdown. Usually is not a good idea mixing HTML and Markdown in the same file. Please, take into account that MIIS allows the use of the HTH. |
Hi, I also thought about to open another issue - but maybe the solution goes in the same direction and it is only a configuration issue. Problem Source MD File Source MD File begin -------------------------------------- Behaviour of Special Characters in MarkdownSmileyThe characters Bold : Some text Codeblock with $“
Usage of $ and ' as following charactersAfter the occurrence of the 2 characters the additional text that will appear at the bottom of the page outside of the main template. ------------------Source MD File end -------------------------------------- It is also attached as zip. The configuration for testing is the default MIIS package as already used for this issue. Result on MIIS Expected Result If it is worth to open an own issue please let me know. Thanks a lot for your support!! |
Hi again: The smiley thing is the default option. If you read the docs there's a configuration parameter called The $ sign issue it's not MIIS, it's Markdig. MIIS doesn't make any replacements like this in the code as you can see if you simply run the source code step by step with your sample file. I recommend you to open an issue in Markdig to anything related with markdown to HTML conversions. MIIS uses Markdig for those. To make sure that you issue is with the conversion process, not with the rendering process, I recommend you to test the content without any template in MIIS to make sure that the issue is not CSS related, as your first one was. If you don't set any template for MIIS (by default you have the Material one selected, just delete the HTH |
Hi again, changing the UseEmoji setting then it works. To be honest I tried it before but set the value to "1" instead of "0". Regarding the other two issues I followed your tip and removed the template setting. When I had a look on babelmark Thank you very much! |
Hi again: You were right about the bug. I overlooked it because AFAIK there were no substitutions for $ in the code. And that was the problem. In fact there should be one in the TemplateHelper class to prevent replacement expressions to act inadvertently in the content when replacing placeholders. I've opened a new issue for this. Now its fixed, although I've not released a new version yet since I want to add some more features in the coming days and will release a new version soon that includes this. If you need it now you can just compile the latest version of the code by yourself (open it in VS and Thanks for pointing it out and sorry for having missed it in the first place. |
Thanks for the quick fix! Can you make a rough estimate when the new version will be available? Thanks a lot! |
IDK, it depends on the free time I have. My expectations are to devote time in the next couple of weeks, but if you want make god laugh, just start planning :-D In my immediate roadmap are some new automatic fields, conditional regions in templates and (hopefully) being able to extend the tool externally (plugins). Search is not on my roadmap because, not being MIIS a static site generator but a semi-dynamic one, it's difficult to index everything in large sites without performance implications. IT should be a dedicated tool, independent of MIIS I guess. In this issue I've posted several readily alternatives to add search to your sites. Cheers. |
Thanks a lot! But releasing a version 2.3.0 one day later isn't too long :-) |
Yes, well, versions are always unexpected because I never know when I'll have the time. In this case the 2.3.0 version was a very minor one. What I was referring to was the 3.0.0 version which will have full Liquid syntax and I will need to destroy and build up again the HTML rendering part. |
I have some generated Markdown files that contain inline HTML (paragraph) tag. When the
<p>
tag is part of a list it is ignored. Consequently the output looks not very nice and is in many cases not readable.MD source:
The output on MIIS looks as follows:
Expected Result start:
First Paragraph
Second Paragraph
First Paragraph in List Item 1
Second Paragraph in List Item 1
First Paragraph in List Item 2
Second Paragraph in List Item 2
Expected Result end:
Hint: Preview was tested for commonmark/markdig on https://babelmark.github.io
The text was updated successfully, but these errors were encountered: