@@ -147,10 +147,7 @@ private fun PostMetadata(metadata: Metadata, modifier: Modifier = Modifier) {
147147 Text (
148148 text = stringResource(
149149 id = R .string.article_post_min_read,
150- formatArgs = arrayOf(
151- metadata.date,
152- metadata.readTimeMinutes,
153- ),
150+ metadata.date, metadata.readTimeMinutes,
154151 ),
155152 style = MaterialTheme .typography.bodySmall,
156153 )
@@ -174,18 +171,21 @@ private fun Paragraph(paragraph: Paragraph) {
174171 textStyle = textStyle,
175172 paragraphStyle = paragraphStyle,
176173 )
174+
177175 ParagraphType .CodeBlock -> CodeBlockParagraph (
178176 text = annotatedString,
179177 textStyle = textStyle,
180178 paragraphStyle = paragraphStyle,
181179 )
180+
182181 ParagraphType .Header -> {
183182 Text (
184183 modifier = Modifier .padding(4 .dp),
185184 text = annotatedString,
186185 style = textStyle.merge(paragraphStyle),
187186 )
188187 }
188+
189189 else -> Text (
190190 modifier = Modifier .padding(4 .dp),
191191 text = annotatedString,
@@ -251,16 +251,20 @@ private fun ParagraphType.getTextAndParagraphStyle(): ParagraphStyling {
251251 textStyle = typography.headlineSmall
252252 trailingPadding = 16 .dp
253253 }
254+
254255 ParagraphType .Text -> {
255256 textStyle = typography.bodyLarge.copy(lineHeight = 28 .sp)
256257 }
258+
257259 ParagraphType .Header -> {
258260 textStyle = typography.headlineMedium
259261 trailingPadding = 16 .dp
260262 }
263+
261264 ParagraphType .CodeBlock -> textStyle = typography.bodyLarge.copy(
262265 fontFamily = FontFamily .Monospace ,
263266 )
267+
264268 ParagraphType .Quote -> textStyle = typography.bodyLarge
265269 ParagraphType .Bullet -> {
266270 paragraphStyle = ParagraphStyle (textIndent = TextIndent (firstLine = 8 .sp))
@@ -288,20 +292,23 @@ fun Markup.toAnnotatedStringItem(typography: Typography, codeBlockBackground: Co
288292 end,
289293 )
290294 }
295+
291296 MarkupType .Link -> {
292297 AnnotatedString .Range (
293298 typography.bodyLarge.copy(textDecoration = TextDecoration .Underline ).toSpanStyle(),
294299 start,
295300 end,
296301 )
297302 }
303+
298304 MarkupType .Bold -> {
299305 AnnotatedString .Range (
300306 typography.bodyLarge.copy(fontWeight = FontWeight .Bold ).toSpanStyle(),
301307 start,
302308 end,
303309 )
304310 }
311+
305312 MarkupType .Code -> {
306313 AnnotatedString .Range (
307314 typography.bodyLarge
0 commit comments