mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 03:22:59 +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(
|
const description = md.match(
|
||||||
new RegExp(`(?:^|\\n)## ${locale}([^]+?)(\\n## [a-z]|\\n\`\`\`|\\n<style>|$)`),
|
new RegExp(`(?:^|\\n)## ${locale}([^]+?)(\\n## [a-z]|\\n\`\`\`|\\n<style>|$)`),
|
||||||
)?.[1];
|
)?.[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.description ??= description?.trim();
|
||||||
props.style ??= style;
|
props.style ??= style;
|
||||||
|
Loading…
Reference in New Issue
Block a user