-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Meta: Use the Readme as the only source of feature descriptions #3678
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
Meta: Use the Readme as the only source of feature descriptions #3678
Conversation
fregante
left a comment
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.
Thanks for looking into this 🍰
|
Thanks for your quick and very helpful review @fregante! I think I have now implemented all your feedback. I really like how commenting out the |
fregante
left a comment
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.
Untested, but looks good so far
| domFormatters.linkifyURLs(descriptionElement); | ||
| domFormatters.parseBackticks(descriptionElement); | ||
| parseSimpleInlineElement(descriptionElement, 'i'); | ||
| parseSimpleInlineElement(descriptionElement, 'kbd'); |
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 has been bugging me because we've ended up pars͡iǹģ H҉T͠M͚̼̱L̷ w̱̳i̓ͭͪ̅͌ṫ͓̼̬̜̔h͐͑͆̊̄͏̟ re̝̘̱̣̥͙͔̝̫͙̯̣ͣ͗ͨ̿̏̌ͤ̋́g̶̟̻̻̳̯̹̞̥̰̲͙̮̝͂̋̾͋̽̂̽̚e͋̔͆̑̌̎͗́̂ͮ̌̅͞҉̛̟͙̠͍̠͍̪͍̝̲̪̳͈̰͍x̷̡̡̢̖̗̞̫̠͉̪ͧ̄̎̌̎ͫ.
Here or in a separate PR I'd like to see the most lightweight Markdown parser being run directly to the description text to store HTML so the entire parseDescription function can be dropped
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.
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 has been bugging me because we've ended up pars͡iǹģ H҉T͠M͚̼̱L̷ w̱̳i̓ͭͪ̅͌ṫ͓̼̬̜̔h͐͑͆̊̄͏̟ re̝̘̱̣̥͙͔̝̫͙̯̣ͣ͗ͨ̿̏̌ͤ̋́g̶̟̻̻̳̯̹̞̥̰̲͙̮̝͂̋̾͋̽̂̽̚e͋̔͆̑̌̎͗́̂ͮ̌̅͞҉̛̟͙̠͍̠͍̪͍̝̲̪̳͈̰͍x̷̡̡̢̖̗̞̫̠͉̪ͧ̄̎̌̎ͫ.
😁 Yes I know, this is not the cleanest way, but I didn't want to completely change it to a real Markdown parser.
Here or in a separate PR I'd like to see the most lightweight Markdown parser being run directly to the description text to store HTML so the entire
parseDescriptionfunction can be dropped
I'll give it a shot in a new PR, I think this one is large enough 😅
Co-authored-by: Federico <opensource@bfred.it>
Co-authored-by: Federico <opensource@bfred.it>
|
The only problem I found is that readme.md is not a watched file, so changes to it will only appear once another file is changed. If there's an easy solution (that doesn't involve a bunch of code and/or a loader), it'd be good to fix it. |
|
🤝 |
Would something like this be an "easy solution that doesn't involve a bunch of code"? Alternatively, there are two Webpack plugins that basically use that code: https://github.com/Fridus/webpack-watch-files-plugin and https://github.com/pigcan/extra-watch-webpack-plugin |
|
Closes #3672.
I've left a settings object (that is empty in most features) infeatures.add, because bothdisabledandshortcutsneed to be defined there.The first two commits actually change some of the descriptions/screenshots, so that the later commits don't introduce any changes that are not visible in any diff. I've made those changes manually (with a helper function that generates two files that I could diff).
Implemented in this PR:
refined-github.ts.shortcutsfromFeatureMetatoFeatureLoader.FeatureMetaparameter fromfeatures.add.<i>and<kbd>tags in addon options:parseBackticks, so that`` ` ``and`` `bla` ``are also parsed correctly (and add some tests for it).concatRegexhelper (suggested by @fregante in Meta: Use the Readme as the only source of feature descriptions #3678 (comment)).