-
Notifications
You must be signed in to change notification settings - Fork 134
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
Markdown headings support #197
Comments
We should implement support for Markdown headings. But I think the TSDoc heading should start at level 1 ( |
As far as the AST representation for headings, probably they should not be a nesting structure. They can be a regular section member similar to a |
Sure, this was just an artifact from optimizing for typedoc's system. |
Let's start with 2 not 1, since the first line of docs is the headline 1 and in HTML only one |
I did not know that! Maybe TSDoc should start with Does anybody else have an issue with this? We could even issue a validation warning for CC @rbuckton |
and
If there is no nesting, should tsdoc really try to enforce/warn about which levels are used? Can it just not pass through the headers that are given? |
There are different scenarios for different tools. The setup that I'm used to is like this:
Typically the original developer may never see the final rendered output at all. Even if there is a nice staging server stood up somewhere, the person writing the code may not be interested in that, and would not bother to look at it. Thus wherever reasonable, it is desirable to catch mistakes as early in the pipeline as possible. Making TSDoc very strict and predictable enables us to catch issues by looking at code comments, without needing to run an entire documentation pipeline to understand how it will get rendered. For people who don't have this requirement, these strict checks can easily be disabled. |
Right, as long as it is a warning it is easily ignorable with a rule, good point 👍 |
Support for markdown headings is listed as a goal in the README, but unsupported in #169. In practice (using the tsdoc playground) it seems to be unsupported. In #169, it is also recommended to open a new issue for further discussion on this point if needed.
To start the discussion, I will share this example that currently works well with TypeDoc:
In this comment, the
#### Example
heading can and should be replaced with@example
. It is not so clear what to do with the#### Complexity
and#### Undefined Behavior
headings. A logical first step is to put both in a@remarks
section, but it is unclear if there is any way to subdivide the remarks section further (without falling back to HTML), other than to allow markdown headers.The text was updated successfully, but these errors were encountered: