-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
Lists in notes now work... notes in lists are slightly trickier. We lose the extra indentation, but that's not so terrible. |
fa6022a
to
e92ca53
Compare
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)
e92ca53
to
0b40bd7
Compare
(Rebase complete.) |
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.
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. |
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.
LOLZ
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.