-
Notifications
You must be signed in to change notification settings - Fork 43
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
Refactor example manipulation to use an AST #2312
base: master
Are you sure you want to change the base?
Conversation
4cb7761
to
7adba83
Compare
0faf5b8
to
ded1a4e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2312 +/- ##
==========================================
+ Coverage 57.08% 57.14% +0.06%
==========================================
Files 368 369 +1
Lines 50535 50676 +141
==========================================
+ Hits 28848 28960 +112
- Misses 20114 20136 +22
- Partials 1573 1580 +7 ☔ View full report in Codecov by Sentry. |
ded1a4e
to
cb54f7c
Compare
To merge, I think we need to add tests for splicing together external examples (I don't think that situation is under test at all right now). Otherwise I think this is ready to merge. |
I'm adding test coverage in preparation for #2312.
bc30c89
to
ec67931
Compare
bf18fca
to
ff5b472
Compare
ff5b472
to
0ddc693
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to get the typo fixed but this looks great!
0ddc693
to
c670f83
Compare
e66ea28
to
3f5492b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice find! I also like that the string renderer is refactored into the extension. 👍
The markdown renderer we use doesn't handle tables. Instead, they were rendered as HTML, which is fine for the registry but a poor experience for the docs embedded into our SDKs. This commit provides a custom renderer for markdown tables, based on "github.com/olekukonko/tablewriter" for the actual table formatting.
3f5492b
to
5a498cc
Compare
I ran a downstream test run and reviewed the results. There are still wholes in our test coverage. I saw a bunch of positive changes, which makes me think this PR is worth merging. These include (but are not limited to): Better parsing removes Unfortunately, the PR also introduces some blocking regressions: Previously, every title was Title Cased. We have accidentally dropped that behavior. Most concerning, some providers leaked their frontmatter into the upstream docs, for example newrelic and nomad:
|
Marking as a draft since this contains known regressions. |
This PR converts the example processing section of
*tfMarkdownParser.parse
to usegoldmark
and an AST transformer.