-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use custom JSX implementation of GitHub's markdown toolbar that works in IE #8
Conversation
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.
Awesome, nice job!!!
Yes, we definitely need to mention GitHub's license as well. I'd say we definitely need to add the following line to our LICENSE
file:
based on code Copyright (c) 2017-2018 GitHub, Inc.
I am unsure about the rules for bundled and minified JS code. Does that need to include license information as well? Especially if the code, like ours, is available open-source...
js/src/forum/pollyfills.js
Outdated
return this.substring(pos, pos + search.length) === search; | ||
} | ||
}); | ||
} |
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.
Where are these taken from? Any other licenses we need to mention?
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.
These are taken from the MDN polyfils @ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill & https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Polyfill.
However, it looks like they first is taken from https://github.com/mathiasbynens/String.prototype.startsWith, so perhaps we want to use the NPM packages instead to avoid licensing issues. Upon further look though, the code from it is way more complicated compared to these 8 lines
Looks like simply including /*! https://mths.be/startswith v0.2.0 by @mathias */
above it might be sufficient.
@franzliedke To include the license in the dist file, one uses I'm not sure if what I wrote would suffice. We could most likely simplify it (and probably should, to reduce bundle size), following one of the examples found @ Open source licensing notices in Web Applications. Most likely use the following format, though only with the /*!
* Copyright OWNER NAME. Licensed under NAME LICENSE HERE
* See license text at http://example.com/license
*/ so use something like /*!
* Original Copyright GitHub, Inc. Licensed under the MIT License.
* See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.
*/ |
We might want to consider bringing the base implementation into core. That way, other extensions can add buttons for things like BBCode without having flarum/markdown enabled. Thoughts ? |
@datitisev can we update/create an issue so that we keep track of that? |
Why was this merged without a single copyright notice? |
@franzliedke Oh, I thought I had taken care of it, and mentioned so in the meeting. The following should be fine (add to all 3 files that use Github code, but only one should use /*!
* Original Copyright GitHub, Inc. Licensed under the MIT License.
* See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.
*/ |
Yes, please add that in master. |
I had to add it to Also added the line to LICENSE. |
Use custom JSX implementation of GitHub's markdown toolbar that works in IE
Use custom JSX implementation of GitHub's markdown toolbar that works in IE
Fixes flarum/framework#1702.
Fixes flarum/framework#1671.
Fixes flarum/framework#1679.
MarkdownToolbar
andMarkdownButton
elements@github/markdown-toolbar-element
into flarum/markdownString#startsWith
,String#endsWith
⌘
ctrl
Perhaps in those comments that don't disappear when compiling. Something like this ?