Update api-documenter to surface information about protected members and fix <p> rendering bug#2
Closed
zelliott wants to merge 1 commit intoprotected-mixinfrom
Closed
Update api-documenter to surface information about protected members and fix <p> rendering bug#2zelliott wants to merge 1 commit intoprotected-mixinfrom
zelliott wants to merge 1 commit intoprotected-mixinfrom
Conversation
…ers and (2) fix <p> rendering bug
Owner
Author
|
Closed in favor of microsoft#3483. |
zelliott
pushed a commit
that referenced
this pull request
Sep 13, 2022
Some proposed changes to microsoft#3602
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To fix the
<p></p>bug...This PR introduces the concept of a "queued write" to the
IntendedWriterthat allows us to "queue" writes for subsequentwritecalls. It's a WIP and I wanted to get some early thoughts before diving in deeper and cleaning up the API a bit.Some alternatives include:
CustomMarkdownEmitterhas finished that "strips" useless text substrings like<p></p>. I didn't take this approach because I wasn't sure how to distinguish between human-authored<p></p>text in a doc comment and<p></p>generated by the emitter.IntendedWriterandStringBuilderto allow for "removing" messages from the string being built-up. Then, right before writing a</p>, we can check to see if the last written chunk was a<p>, and if so, remove the<p>and avoid writing a</p>.trimmedParagraph.nodesbefore writing any<p>tag in order to determine whether anything will be written. Create a helper function called something likewillWriteAnythingthat can be called on a list of nodes. We can also place this function right at the top ofwriteNodesto quickly return out if we know nothing will be written. Note however that as the recursivewriteNodefunction changes, this helper function will potentially need to change as well. SupposewriteNodeis updated such thatLinkTagno longer writes anything. The helper function will also need to be updated.dryRunboolean option towriteNodesthat allows us to callwriteNodeswithout actually writing anything. Instead, it returns a string of what would have been written. We can then check to see if this is empty, and if so, not write a<p>. If it's not empty, we can take the string we would've written and write it immediately after the<p>. If this option can work, I think I potentially like this the most. I just only came up with it recently.