Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9e5d45

Browse files
authored
Merge pull requestcoderoad#134 from ShMcK/feature/dark-code-block
addressescoderoad#125. inline code dark background
2 parents3f68df6 +9807c2e commitd9e5d45

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

‎web-app/src/components/Markdown/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const Markdown = (props: Props) => {
6666
</div>`
6767
}
6868
// TODO sanitize markdown or HTML
69-
return<divdangerouslySetInnerHTML={{__html:html}}/>
69+
return<spanclassName="coderoad-markdown"dangerouslySetInnerHTML={{__html:html}}/>
7070
}
7171

7272
exportdefaultMarkdown

‎web-app/src/components/Markdown/prism.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ import 'prismjs/components/prism-typescript'
1111
import'prismjs/themes/prism-tomorrow.css'
1212

1313
// TODO import all - current list only supports js related
14+
15+
// resolve unsupported style cases
16+
import'./style.css'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.coderoad-markdown:not(pre)>code {
2+
background-color: black;
3+
color: white;
4+
border-radius:2px;
5+
padding:0.1rem;
6+
}

‎web-app/stories/Step.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ const stepText =
99
'This is a long paragraph of step text intended to wrap around the side after a short period of writing to demonstrate text wrap among other things'
1010

1111
constparagraphText=`Markdown included \`code\`, *bold*, & _italics_.
12+
13+
Inline code: \`<h1>HTML</h1>\`, \`function someFunc() { var a = 1; return a; }\`
14+
1215
\`\`\`javascript
1316
var a = 12
1417

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp