-
Notifications
You must be signed in to change notification settings - Fork 122
feat: add x-markdown component for rendering markdown content with st… #2190
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
base: main
Are you sure you want to change the base?
Changes from all commits
c3a7764
dddccc3
74d4e49
924aca0
8b0165b
d9fb103
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| "@lynx-js/web-elements": patch | ||
| --- | ||
|
|
||
| feat: add x-markdown support | ||
|
|
||
| The x-markdonw is under opt-in importing pattern. | ||
|
|
||
| ```javascript | ||
| import '@lynx-js/web-elements/XMarkdown'; | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |||||
| @import url("./src/elements/XSvg/x-svg.css"); | ||||||
| @import url("./src/elements/XImage/x-image.css"); | ||||||
| @import url("./src/elements/XInput/x-input.css"); | ||||||
| @import url("./src/elements/XMarkdown/x-markdown.css"); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix CSS import notation to satisfy stylelint. Line 16 uses 🔧 Proposed fix-@import url("./src/elements/XMarkdown/x-markdown.css");
+@import "./src/elements/XMarkdown/x-markdown.css";📝 Committable suggestion
Suggested change
🧰 Tools🪛 Stylelint (17.3.0)[error] 16-16: Expected "url("./src/elements/XMarkdown/x-markdown.css")" to be ""./src/elements/XMarkdown/x-markdown.css"" (import-notation) (import-notation) 🤖 Prompt for AI Agents |
||||||
| @import url("./src/elements/XOverlayNg/x-overlay-ng.css"); | ||||||
| @import url("./src/elements/XRefreshView/x-refresh-view.css"); | ||||||
| @import url("./src/elements/XSwiper/x-swiper.css"); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /* | ||
| // Copyright 2024 The Lynx Authors. All rights reserved. | ||
| // Licensed under the Apache License Version 2.0 that can be found in the | ||
| // LICENSE file in the root directory of this source tree. | ||
| */ | ||
| import { Component } from '../../element-reactive/index.js'; | ||
| import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js'; | ||
| import { templateXMarkdown } from '../htmlTemplates.js'; | ||
| import { XMarkdownAttributes } from './XMarkdownAttributes.js'; | ||
|
|
||
| @Component<typeof XMarkdown>( | ||
| 'x-markdown', | ||
| [CommonEventsAndMethods, XMarkdownAttributes], | ||
| templateXMarkdown, | ||
| ) | ||
| export class XMarkdown extends HTMLElement {} |
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.
Fix typo: “x-markdonw” → “x-markdown”.
Minor spelling issue in the changeset description.
✍️ Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: Ensure spelling is correct
Context: ...-- feat: add x-markdown support The x-markdonw is under opt-in importing pattern. ```...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents