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

Indent lists in notes #515

Merged
merged 1 commit into from
Mar 18, 2022
Merged

Conversation

jskeet
Copy link
Contributor

@jskeet jskeet commented Mar 18, 2022

Fixes #435 (and extract some constants which were duplicated in many places)

I've checked that this looks appropriate in 6.4.3, 8.3.5 and 17.6.2, which were all mentioned in that issue. Given that those ones are fine, I don't expect to see any problems elsewhere.

@jskeet jskeet requested a review from BillWagner March 18, 2022 08:24
@jskeet jskeet mentioned this pull request Mar 18, 2022
@jskeet
Copy link
Contributor Author

jskeet commented Mar 18, 2022

Lists in notes now work... notes in lists are slightly trickier. We lose the extra indentation, but that's not so terrible.

@jskeet jskeet force-pushed the list-indentation-in-notes branch from fa6022a to e92ca53 Compare March 18, 2022 11:13
@jskeet
Copy link
Contributor Author

jskeet commented Mar 18, 2022

We also lose the extra indentation for code blocks in notes. We could probably fix that relatively easily if we wanted to, but it would cramp the line lengths further.

Fixes dotnet#435 (and extract some constants which were duplicated in many places)
@jskeet jskeet force-pushed the list-indentation-in-notes branch from e92ca53 to 0b40bd7 Compare March 18, 2022 14:56
@jskeet
Copy link
Contributor Author

jskeet commented Mar 18, 2022

(Rebase complete.)

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

This also LGTM @jskeet

yield return paragraph;
}
else if (element is Table table)
{
if (table.ElementAt(0) is TableProperties tableProperties)
{
tableProperties.TableIndentation ??= new TableIndentation();
tableProperties.TableIndentation.Width = 540;
// TODO: This will be incorrect if we ever have a table in a list in a note.
// Let's just try not to do that.
Copy link
Member

Choose a reason for hiding this comment

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

LOLZ

@jskeet jskeet merged commit f553637 into dotnet:draft-v6 Mar 18, 2022
@jskeet jskeet deleted the list-indentation-in-notes branch March 18, 2022 14:59
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.

Word converter: List items in notes/examples are badly formatted
2 participants