Skip to content

Fix xml Blocks - #9852

Merged
rpetrusha merged 3 commits into
dotnet:masterfrom
msschl:fix-xml-code-blocks
Jan 8, 2019
Merged

rpetrusha merged 3 commits into
dotnet:masterfrom
msschl:fix-xml-code-blocks

Conversation

@msschl

@msschl msschl commented Jan 5, 2019

Copy link
Copy Markdown
Contributor

Summary

Contributes to #8125

Fixes #8125

Contributes to dotnet#8125
@msschl
msschl requested a review from Lxiamail as a code owner January 5, 2019 17:06
@msschl

msschl commented Jan 7, 2019

Copy link
Copy Markdown
Contributor Author

This PR fixes all xml syntax blocks.

Style rules applied:

  • every line ends with two spaces
  • every xml element is indented by two spaces
  • every closing xml element \> is prefixed with one space e.g. <element key="value" \>
  • if more than one key-value-pair is specified, all key-value-pairs starting form the second key-value-pair are indented by spaces until they align to the first key-value-pair

@rpetrusha rpetrusha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you so much for addressing #8125 and fixing the broken XML syntax blocks. Your changes look really good, except that the two spaces at the end of a line in a fenced code block are not necessary. If it is easy for you to revert those changes, we'd appreciate it. If not, we'll merge your PR as is.

@msschl

msschl commented Jan 8, 2019

Copy link
Copy Markdown
Contributor Author

@rpetrusha I think this is all :-)

@nxtn

nxtn commented Jan 8, 2019 •

Copy link
Copy Markdown
Contributor

There are more broken XML code blocks in #9744 :-)

You could also fix them if you are interested.

@msschl

msschl commented Jan 8, 2019

Copy link
Copy Markdown
Contributor Author

Sure, I'll take a look. :-)

@nxtn

nxtn commented Jan 8, 2019 •

Copy link
Copy Markdown
Contributor

Would you like to share your codes used to fix these code blocks? I was about to write them.

@msschl

msschl commented Jan 8, 2019

Copy link
Copy Markdown
Contributor Author

@NextTurn See https://gist.github.com/msschl/fdfc2b5f4e1ab5ae9d4429849d2bd894

I used this to remove all the spaces at the end of a line inside a xml code block. All other XML formatting was done by hand. But I wanted to start working on a littel tool to format the xml code blocks inside a markdown file :)

@nxtn

nxtn commented Jan 8, 2019

Copy link
Copy Markdown
Contributor

Thanks for your hard work!

I am going to develop such a tool after fixing that issue so that it won't be blocked by the exceptions.

@nxtn

nxtn commented Jan 8, 2019

Copy link
Copy Markdown
Contributor

As for the spaces, they are everywhere so you don't need to be limited to code blocks.

See #9755

@msschl

msschl commented Jan 8, 2019

Copy link
Copy Markdown
Contributor Author

Oh ok, thanks that's good to know.

@rpetrusha

Copy link
Copy Markdown
Contributor

Although in some cases, @NextTurn, trailing spaces are significant. That's particularly the case in See Also sections in the conceptual documentation,, where 2+ spaces cause a line break; otherwise, multiple links appear on a single line unless they are bulleted list items. They also can be important in lists and list continuations.

@rpetrusha

Copy link
Copy Markdown
Contributor

Thank you so much, @msschl, both for your original PR and for addressing my comments so quickly. I'll merge your PR now.

@rpetrusha
rpetrusha merged commit d06128c into dotnet:master Jan 8, 2019
@msschl
msschl deleted the fix-xml-code-blocks branch January 8, 2019 19:27
@nxtn nxtn mentioned this pull request Jan 9, 2019
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.

3 participants