
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
@betomorrow/styled-tagged-text
Advanced tools
Parse your text and split it into multiple components with custom styles
Text component for React and React-Native application. Apply custom styles on specifics parts of your text, by enclosing them with bracket tags. Typically useful when using internationalization.
npm install @betomorrow/styled-tagged-text
// style
const tagsStyle = StyleSheet.create({
b: { fontWeight: "700" },
i: { fontStyle: "italic" },
emph: { color: "#eb4034", fontSize: 16 },
});
// Component
import { StyledTaggedText } from "@betomorrow/styled-tagged-text/native";
<StyledTaggedText tagsStyle={tagsStyle}>
Normal [b]Bold[/b] [i][b]Bold Italic[/b] Italic[/i] [emph]Emphasize[/emph]
</StyledTaggedText>;
Render:

Use <StyledTaggedText> exactly like a <Text> components.
removeUnknownTags: By default, tags with no associated style are treated and displayed as text. Setting to true, tags are always removed from the text.Text (span on web) properties.// Define your style
const tagsStyle = {
b: { fontWeight: "bold" },
i: { fontStyle: "italic" },
emph: { color: "#eb4034", fontSize: 16 },
};
// Component
import { StyledTaggedSpan } from "@betomorrow/styled-tagged-text";
<StyledTaggedSpan tagsStyle={tagsStyle}>
Normal [b]Bold[/b] [i][b]Bold Italic[/b] Italic[/i] [emph]Emphasize[/emph]
</StyledTaggedSpan>;
Use <StyledTaggedSpan> exactly like a <span> components.
Underneath, StyledTaggedText (StyledTaggedSpan on web) are just nested Text (span) components with inline style. They have the exact same behavior, so you can transmit props as well.
<StyledTaggedText
tagsStyle={{ b: { fontWeight: "bold" }, i: { fontStyle: "italic" }, emph: { color: "#eb4034", fontSize: 16 } }}>
Normal [b]Bold[/b] [i][b]Bold Italic[/b] Italic[/i] [emph]Emphasize[/emph]
</StyledTaggedText>
Will render exactly:
<span>
Normal
<span style="font-weight: bold;">Bold</span>
<span style="font-style: italic;">
<span style="font-weight: bold;">Bold Italic</span>
Italic
</span>
<span style="color: rgb(235, 64, 52); font-size: 16px;">Emphasize</span>
</span>
FAQs
Parse your text and split it into multiple components with custom styles
The npm package @betomorrow/styled-tagged-text receives a total of 273 weekly downloads. As such, @betomorrow/styled-tagged-text popularity was classified as not popular.
We found that @betomorrow/styled-tagged-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Google’s UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.