Why are markdown bullet points separated by an extra newline? - html

My markdown page contains these lines:
- [Section1](#section1)
- [Subsection1](#subsection1)
- [Subsection2](#subsection2)
- [Section2](#section2)
- [Section3](#section3)
- [Section4](#section4)
The expected output (assume each bullet is a hyperlink):
Section1
Subsection1
Subsection2
Section2
Section3
Section4
The actual output (assume each bullet is a hyperlink):
Section1
Subsection1
Subsection2
Section2
Section3
Section4
I don't know why Github/Jekyll server doesn't generate the expected output.
When I viewed the source in the browser (Chrome), I found this (which is not expected):
<ul>
<li>
<p><a href='#section1'>Section1</a></p>
<ul>
<li><a href='#subsection1'>Subsection1</a></li>
<li><a href='#subsection2'>Subsection2</a></li>
</ul>
</li>
<li>
<p><a href='#section2'>Section2</a></p>
</li>
<li>
<p><a href='#section3'>Section3</a></p>
</li>
<li>
<p><a href='#section4'>Section4</a></p>
</li>
</ul>
Why do I see <p> tags here? Something wrong with the generator or my markdown code?
How should I fix it?

I have just run a few tests and it looks like it is the markdown processing engine that is causing the issue.
With the Maruku markdown engine the blank lines are added.
With the redcarpet markdown engine no additional lines are added.
With the kramdown markdown engine no additional lines are added.
(Can't test with rdiscount as it doesn't install on Windows)

Related

The home page translation link is static and is not used to translate all pages

I have a problem I hope to solve it as I display in the navbar languages ​​used in the site and I want whenever you click on the language the page appears with the translation in all pages and not only the main page ,with the translation link changes with each page
http://127.0.0.1:8000/fr/
http://127.0.0.1:8000/fr/our-company
So add on the home page link.
How to fixed the link on the home page so that the translation is displayed for all pages and keep on the same page translated
Navbar home page in all pages
<ul class="navigation__dropdown-wrap--language">
<li>
<a data-culture="ar" data-lang="True" href="/">العربية</a>
</li>
<hr>
<li>
<a data-culture="en" data-lang="True" href="/en/" lang="en">English</a>
</li>
<hr>
<li>
<a data-culture="fr" data-lang="True" href="/fr/" lang="fr">français</a>
</li>
<hr>
</ul>
Try looking into Django's i18n package. It comes with full support for translations, timezones and locales. (Numbers and dateformats).
The package comes with support for internationalized URLs.

common mark / vscode table of contents not working

I'm using the current version visual studio code and extensions Markdown All in One, Markdown Paste, markdownlint, and Markdown+Math.
in markdown I write:
## Table of Contents
1. [heading](##heading%201)
2. [heading](##heading%202)
## heading 1
...
## Heading 2
This works as expected in the preview screen, which is nice but irrelevant
In Html I get
<h2 id="table-of-contents">Table of Contents</h2>
<ol>
<li>heading 1</li>
<li>heading 2</li>
</ol>
<h2 id="heading-1">heading 1</h2>
...
<h2 id="heading-2">heading 2</h2>
and while the links navigate to file:///c:....html#heading%20X the broswer, current version of chrome, doesn't jump to the right spot.
How can I fix this? Is it a problem with the md to html transformation or the file protocol?

How to add a pre-made template to products

I have an eBay shop and when I make a listing I have a pre made template and I just import information to this template.
I have a short description, features, and specifications. And I need to add automatically <li></li> to every line and a pre made HTML table with custom style, Which will know how to separate with "/" symbol like I have in my private listing tool.
Is this even possible? And if it is any idea how?
I do not believe Magento works in that manner however there is an easy efficient way to accomplish this manually.
Try putting the code in Sumblime text 3 with teh Emmet plugin.
From there you can type a command like ul>li*8 (the 8 is the # of items or <li></li> tags) and then press the tab key.
the results will be
<ul>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ul>
From there you can fill in the blanks between the <li></li>.

Rmarkdown Slidy indented lists

I use Rmarkdown with slidy mostly. I like it because I can use html tags outside of r code chunks (perhaps it is do-able in other formats, no idea). However I run into trouble with indented lists.
---
title: "Test"
author: "Me"
date: "Today"
output:
slidy_presentation
---
## Test Slide
<ul>
<li>One Bullet Point
</ul>
This works like a charm.
Output (html):
<div id="test-slide" class="slide section level2">
<h1>Test Slide</h1>
<ul>
<li>
One Bullet Point
</ul>
</div>
However:
## Test Slide Indented
<ul>
<li>One Bullet Point
<ul>
<li>One Indented Bullet Point
</ul>
</ul>
Causes trouble. Output (html again):
<div id="test-slide-indented" class="slide section level2">
<h1>Test Slide</h1>
<ul>
<li>
One Bullet Point
<ul>
<pre><code> <li>One Indented Bullet Point</code></pre>
</ul>
</ul>
</div>
And thus "list within the list" appears as a code chunk rather than an indented list in the html document.
You have four spaces preceding the line with the list element. This means that pandoc will interpret that line as a code chunk. As far as I know there's no option to prevent this, so you will need to remove the indenting before the html tags.
http://rmarkdown.rstudio.com/authoring_pandoc_markdown.html#verbatim-code-blocks
I will also point out that markdown supports nested lists so there's no need to use html tags in your example:
- One bullet point
+ One indented bullet

Auto-indentation in C#

Is there an open-source library or code-sample in C#, that will re-indent a string of HTML code?
For example, convert this:
<li>
this
</li><li>that
</li>
To this:
<li>
this
</li>
<li>
that
</li>
Note: I don't want any of the HTML to be altered or moved around the way HTML Tidy does.
I only want the markup to be re-indented, nothing else.
Using Notepad++ if you paste your sample in and choose Language | Html and then Text FX | Text FX Html Tidy | Tidy Reindent Xml ...
Your sample becomes:
<li>
this
</li>
<li>
that
</li>