-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Return <DOCTYPE!> back and little refactoring of docs/build.js #634
Conversation
There are two merge conflicts with |
return new Promise((resolve, reject) => { | ||
Router.run(routes, '/' + fileName, Handler => { | ||
let html = React.renderToString(React.createElement(Handler)); | ||
html = '<!doctype html>' + html; |
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.
should that be DOCTYPE in caps?
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.
It was originally in lowercase
react-bootstrap/docs/src/Root.js
Line 45 in 120ba6d
return '<!doctype html>'; |
And I'm looking at
source
tab in browser, all html code is lowercased.The same
style
😄
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 don't think that it's important either way: http://stackoverflow.com/questions/7020961/uppercase-or-lowercase-doctype
First time it was introduced here https://github.com/react-bootstrap/react-bootstrap/blob/120ba6d38a4/Gruntfile.js#L204 Then it was moved here react-bootstrap@addc396#diff-31cfa4797a188b7ab32b049b80c82ea6R63 And finally it was lost here react-bootstrap@804c24a#diff-4cd8a3a29faaf037ff2ec547bf1635abL10 and here react-bootstrap@804c24a#diff-ce9d98be04f7a23d325c274fc1a0a089L21 After that `Root.renderToString()` method (and some others) became unused.
Add more clarity about what's going on.
Rewritten for merging. |
LGTM |
Return <DOCTYPE!> back and little refactoring of docs/build.js
Return
<DOCTYPE!>
to pages.First time it was introduced here
https://github.com/react-bootstrap/react-bootstrap/blob/120ba6d38a4/Gruntfile.js#L204
Then it was moved here
addc396#diff-31cfa4797a188b7ab32b049b80c82ea6R63
And finally it was lost
Root
=>React
easy to overlookfrom
var RootHTML = Root.renderToString()
to
var RootHTML = React.renderToString()
here
804c24a#diff-4cd8a3a29faaf037ff2ec547bf1635abL10
and here
804c24a#diff-ce9d98be04f7a23d325c274fc1a0a089L21
After that
Root.renderToString()
method (and some others) became unused.And I've moved out html generating code for all docs - pages into standalone function
for clarity.
Those
spagetty
drives me crazy.Less complexity promotes easier entrance for new contributors.