mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
docs: correct style extract from markdown demo (#38637)
This commit is contained in:
parent
dc6bcc8acb
commit
9dcc4aab2c
@ -26,7 +26,7 @@ class AntdReactTechStack extends ReactTechStack {
|
||||
const description = md.match(
|
||||
new RegExp(`(?:^|\\n)## ${locale}([^]+?)(\\n## [a-z]|\\n\`\`\`|\\n<style>|$)`),
|
||||
)?.[1];
|
||||
const style = md.match(/\n```css\n([^]+?)\n```|\n<style>\n([^]+?)\n<\/style>/)?.[1];
|
||||
const style = md.match(/\n(?:```css|<style>)\n([^]+?)\n(?:```|<\/style>)/)?.[1];
|
||||
|
||||
props.description ??= description?.trim();
|
||||
props.style ??= style;
|
||||
|
Loading…
Reference in New Issue
Block a user