Comments (7)
@JosuGZ I got it working using fence instead of code_block:
fence: {
color: '#E94B3CFF',
backgroundColor: '#2D2926FF',
},
from react-native-markdown-display.
just to let you know @keanfreeman i am sick of the difference between the styles and render rules so 6.0.0 just changes them all to match
Render Rule | Style(s) |
---|---|
body |
body |
heading1 |
heading1 |
heading2 |
heading2 |
heading3 |
heading3 |
heading4 |
heading4 |
heading5 |
heading5 |
heading6 |
heading6 |
hr |
hr |
strong |
strong |
em |
em |
s |
s |
blockquote |
blockquote |
bullet_list |
bullet_list |
ordered_list |
ordered_list |
list_item |
list_item - This is a special case that contains a set of pseudo classes that don't align to the render rule: ordered_list_icon , ordered_list_content , bullet_list_icon , bullet_list_content |
code_inline |
code_inline |
code_block |
code_block |
fence |
fence |
table |
table |
thead |
thead |
tbody |
tbody |
th |
th |
tr |
tr |
td |
td |
link |
link |
blocklink |
blocklink |
image |
image |
text |
text |
textgroup |
textgroup |
paragraph |
paragraph |
hardbreak |
hardbreak |
softbreak |
softbreak |
pre |
pre |
inline |
inline |
span |
span |
from react-native-markdown-display.
This is because of bad / confusing naming of the rules and the styles
take a look at the readme and you will see that the style for code blocks is not the same name as the rules:
const copy = `
# Boom title
Some text
\`\`\`
Code block
\`\`\`
\`inline code thing\`
`;
const styles = StyleSheet.create({
root: { color: "red" },
codeBlock: { color: "blue" }
});
I would like to clean this up, but because of backwards compat with react-native-markdown-renderer
its really tough.
from react-native-markdown-display.
Thanks, I appreciate it.
from react-native-markdown-display.
Seems like a good change!
from react-native-markdown-display.
Hi, I can get code_inline
working, but not code_block
(nor codeBlock
):
My style sheet:
const styles = StyleSheet.create({
heading1: {
fontSize: 32,
// backgroundColor: '#000000',
color: '#E94B3CFF',
},
heading2: {
fontSize: 24,
color: '#E94B3CFF',
},
heading3: {
fontSize: 18,
color: '#E94B3CFF',
},
heading4: {
fontSize: 16,
color: '#E94B3CFF',
},
heading5: {
fontSize: 13,
color: '#E94B3CFF',
},
heading6: {
fontSize: 11,
color: '#E94B3CFF',
},
code_inline: {
color: '#E94B3CFF',
backgroundColor: '#2D2926FF',
},
code_block: {
color: '#E94B3CFF',
backgroundColor: '#2D2926FF',
},
blockquote: {
color: '#E94B3CFF',
backgroundColor: '#2D2926FF',
},
});
from react-native-markdown-display.
@JosuGZ I got it working using fence instead of code_block:
fence: { color: '#E94B3CFF', backgroundColor: '#2D2926FF', },
Thanks, it works!
Aparently, this:
Code here
is not the same than this:
```
Code here
```
from react-native-markdown-display.
Related Issues (20)
- In the flex row layout, the list will be truncated
- Does not work on Android HOT 2
- Markdown unable to parse bold italic HOT 1
- Generates 2 moderate severity vulnerabilities HOT 2
- Remount issue for AST nodes HOT 1
- Incorrect types: sourceInfo missing from ASTNode
- Render Error - MarkdownIT HOT 1
- openUrl types are not correct
- textAlign: "center" not working on second paragraph HOT 2
- Custom rule does not work
- Rendering math Equation HOT 4
- Selectable. HOT 1
- Footnotes not working HOT 1
- ERROR Warning: Function components cannot be given refs. HOT 1
- Properly handling task list markdown
- ./common/utils.isString is not a function
- Custom rules HOT 1
- Lists (both Ordered and Unordered) fail to render correctly if alignItems style in parent element HOT 4
- Bold Headers last token gets truncated HOT 1
- Table alignment doesn't work on Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-markdown-display.