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

patch: use marked 0.6.0 to support id generation for headers #966

Merged
merged 5 commits into from Feb 17, 2019
Merged

patch: use marked 0.6.0 to support id generation for headers #966

merged 5 commits into from Feb 17, 2019

Conversation

Beraliv
Copy link
Contributor

@Beraliv Beraliv commented Feb 5, 2019

Release of marked@0.6.0
Added feature with Slugger

Problem: README contains links to different headers which cannot be properly generated (Github is instead working just fine with it)

Fix: After updating version of marked id generation is automatically supported

How to reproduce: Get README where there are some relative links #link-to-header, use typedoc and see that id is - or something else

After fix: id is properly added and links are working fine like in Github

@aciccarello
Copy link
Collaborator

Thanks for the contribution. Could you change a test to demonstrate this? Let us know if you have questions.

@Beraliv
Copy link
Contributor Author

Beraliv commented Feb 5, 2019

@aciccarello yeah, sure
will provide today lately

@Beraliv
Copy link
Contributor Author

Beraliv commented Feb 6, 2019

@aciccarello how can I point out that I use marked
I don't think it's plugin. However name of Marked is included in MarkedPlugin which is confusing a bit
And the constructor of Application has no working example yet (i'm working on it, right 👍)

If I use

app = new Application({
   mode:   'Modules',
   logger: 'none',
   target: 'ES5',
   module: 'CommonJS',
   experimentalDecorators: true
});

it will provide useless output

{
  "id": 0,
  "kind": 0,
  "flags": {}
}

How can it be resolved?

@aciccarello
Copy link
Collaborator

The file isn't converted because it is not a typescript file. Only the readme markdown file is parsed by default.

You'll probably want to change the examples/basic/README.md file added in #857 to test.

@Beraliv
Copy link
Contributor Author

Beraliv commented Feb 11, 2019

@aciccarello I think it's ready

@@ -81,6 +81,15 @@ <h3 id="arguments">Arguments</h3>
<li><code>--example &lt;project&gt;</code><br>
Example explanation.</li>
</ul>
<h2 id="example-with-cyrillic">Example with Cyrillic</h2>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first case, only Latin, should be with hyphen as it was

@@ -81,6 +81,15 @@ <h3 id="arguments">Arguments</h3>
<li><code>--example &lt;project&gt;</code><br>
Example explanation.</li>
</ul>
<h2 id="example-with-cyrillic">Example with Cyrillic</h2>
<h3 id="пример-api">Пример API</h3>
Copy link
Contributor Author

@Beraliv Beraliv Feb 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second case, combined Latin and Cyrillic
it would be id="-api" without patching

<blockquote>
<p>Combined Latin and Cyrillic text</p>
</blockquote>
<h3 id="только-кириллица">Только кириллица</h3>
Copy link
Contributor Author

@Beraliv Beraliv Feb 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

third case, only Cyrillic
it would be id="-" without patching

@Beraliv
Copy link
Contributor Author

Beraliv commented Feb 16, 2019

@aciccarello is everything good?

@aciccarello
Copy link
Collaborator

Sorry for the delay. Somehow I missed your updates. Looks great!

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

Successfully merging this pull request may close these issues.

None yet

2 participants