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

addresses #125. inline code dark background#134

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 1 commit intomasterfromfeature/dark-code-block
Mar 8, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionweb-app/src/components/Markdown/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -66,7 +66,7 @@ const Markdown = (props: Props) => {
</div>`
}
// TODO sanitize markdown or HTML
return <div dangerouslySetInnerHTML={{ __html: html }} />
return <span className="coderoad-markdown" dangerouslySetInnerHTML={{ __html: html }} />
}

export default Markdown
3 changes: 3 additions & 0 deletionsweb-app/src/components/Markdown/prism.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,3 +11,6 @@ import 'prismjs/components/prism-typescript'
import 'prismjs/themes/prism-tomorrow.css'

// TODO import all - current list only supports js related

// resolve unsupported style cases
import './style.css'
6 changes: 6 additions & 0 deletionsweb-app/src/components/Markdown/style.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
.coderoad-markdown :not(pre) > code {
background-color: black;
color: white;
border-radius: 2px;
padding: 0.1rem;
}
3 changes: 3 additions & 0 deletionsweb-app/stories/Step.stories.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,9 @@ const stepText =
'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'

const paragraphText = `Markdown included \`code\`, *bold*, & _italics_.

Inline code: \`<h1>HTML</h1>\`, \`function someFunc() { var a = 1; return a; }\`

\`\`\`javascript
var a = 12

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp