Conversation
lennessyy
commented
Sep 12, 2025
|
|
||
| config.enable_source_link = | ||
| extracted?.enable_source_link ?? true | ||
| ? current.enable_source_link |
Contributor
Author
There was a problem hiding this comment.
This is fancy looking but I thought it was too hard to read
| for (const file of files) { | ||
| await writeAsync( | ||
| file.fullpath, | ||
| file.fileString(this.config.features.enable_code_dedenting) |
Contributor
Author
There was a problem hiding this comment.
I removed the old dedenting implementation to avoid confusing.
| if (config.select !== undefined) { | ||
| const selectedLines = selectLines(config.select, this.lines, this.ext); | ||
| lines.push(...selectedLines); | ||
| let snippetLines = selectLines(config.select, this.lines, this.ext); |
Contributor
Author
There was a problem hiding this comment.
This is where we assemble the lines of the snippet and where I run the lines through the dedenting functions
axfelix
approved these changes
Sep 17, 2025
Contributor
axfelix
left a comment
There was a problem hiding this comment.
Excellent and thorough changes!
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.
Previous implementation of de-indenting was flawed. It would de-indent every line in the whole Markdown file if turned on - including lists and other text that we don't want to de-indent. This was not caught in the test cases since the entire test case only had a code snippet but no preceding or succeeding lines.
See the results in the diffs of this PR: https://github.com/temporalio/documentation/pull/3840/files