Skip to content
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

Miniclass directive produces wrong html in some cases #29

Open
CroniD opened this issue Jul 6, 2017 · 0 comments
Open

Miniclass directive produces wrong html in some cases #29

CroniD opened this issue Jul 6, 2017 · 0 comments

Comments

@CroniD
Copy link

CroniD commented Jul 6, 2017

Hi there,

I tried the following cases with the basic templates and the latest leafdoc (1.4.1).

test01.leafdoc

@miniclass MyMiniClass (MyParentClass)

A comment, lonely but its happy.

produces

<h2 id="myparentclass">MyParentClass</h2>
<h2 id="myminiclass"></h2>
A comment, lonely but its happy.

What is wrong: Name of the Miniclass is missing.

test02.leafdoc

@miniclass MyMiniClass (MyParentClass)
@section

A comment, lonely but its happy.

produces

<h2 id="myparentclass">MyParentClass</h2>
<h2 id="myminiclass"></h2>

What is wrong: Name of the Miniclass and Comment are missing.

test03.leafdoc

@miniclass MyMiniClass (MyParentClass)
@section

A comment, lonely but its happy.

@option foo : Boolean = true

produces

<h2 id="myparentclass">MyParentClass</h2>
<h2 id="myminiclass"></h2>
<h3 id="myminiclass-option">MyMiniClass</h3>
<section data-type="[object Object]">
A comment, lonely but its happy.
<table><thead>
	<tr>
		<th>Option</th>
		<th>Type</th>
		<th>Default</th>
		<th>Description</th>
	</tr>
	</thead><tbody>
	<tr id="myminiclass-foo">
		<td><code><b>foo</b></code></td>
		<td><code>Boolean</code>
		</td><td><code>true</code></td>
		<td></td>
	</tr>
</tbody></table>
</section>

What is wrong: Two headings for the Miniclass (h2 is empty, h3 is not and has the wrong string). Comment is in the wrong place (should be outside of the "section" element).

test04.leafdoc

@miniclass MyMiniClass (MyParentClass)

A comment, lonely but its happy.

@option foo : Boolean = true

produces

<h2 id="myparentclass">MyParentClass</h2>
<h2 id="myminiclass"></h2>
A comment, lonely but its happy.
<h3 id="myminiclass-option">MyMiniClass</h3>
<section data-type="[object Object]">
<table><thead>
	<tr>
		<th>Option</th>
		<th>Type</th>
		<th>Default</th>
		<th>Description</th>
	</tr>
	</thead><tbody>
	<tr id="myminiclass-foo">
		<td><code><b>foo</b></code></td>
		<td><code>Boolean</code>
		</td><td><code>true</code></td>
		<td></td>
	</tr>
</tbody></table>
</section>

What is wrong: Two headings for the Miniclass (h2 is empty, h3 is not and has the wrong string).

Also, maybe the Miniclass directive should have it's own template. And the miniclass feature is not documentated at all (README.md).

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant