Markdown updates

On status-go side:
- new `strong-emph` node was added for strong emphasised text with triple
  "*" and "_"
- `del` node got proper marshalling and can be recognised (works with single
  and double "~")

On status react side:
- styles for `strong-emph` nodes
- styles for `del` (strikethrough) nodes
- unsuccessful attempt to use monospaced fonts for code/codeblock (we have a font
  which is used as monospaced but doesn't support that property actually)
This commit is contained in:
Roman Volosovskyi 2020-10-21 22:23:42 +03:00
parent 9691626992
commit 70526f9429
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
3 changed files with 23 additions and 5 deletions

View File

@ -63,7 +63,8 @@
"code" "code"
(conj acc [quo/text {:max-font-size-multiplier react/max-font-size-multiplier (conj acc [quo/text {:max-font-size-multiplier react/max-font-size-multiplier
:style (style/inline-code-style)} :style (style/inline-code-style)
:monospace true}
literal]) literal])
"emph" "emph"
@ -72,6 +73,12 @@
"strong" "strong"
(conj acc [react/text-class (style/strong-style outgoing) literal]) (conj acc [react/text-class (style/strong-style outgoing) literal])
"strong-emph"
(conj acc [quo/text (style/strong-emph-style outgoing) literal])
"del"
(conj acc [react/text-class (style/strikethrough-style outgoing) literal])
"link" "link"
(conj acc (conj acc
[react/text-class [react/text-class
@ -124,7 +131,8 @@
"codeblock" "codeblock"
(conj acc [react/view {:style style/codeblock-style} (conj acc [react/view {:style style/codeblock-style}
[quo/text {:max-font-size-multiplier react/max-font-size-multiplier [quo/text {:max-font-size-multiplier react/max-font-size-multiplier
:style style/codeblock-text-style} :style style/codeblock-text-style
:monospace true}
(.substring literal 0 (dec (.-length literal)))]]) (.substring literal 0 (dec (.-length literal)))]])
acc)) acc))

View File

@ -245,6 +245,16 @@
(outgoing-strong-text-style) (outgoing-strong-text-style)
(strong-text-style))) (strong-text-style)))
(defn strong-emph-style [outgoing]
(update (strong-style outgoing) :style
assoc :font-style :italic))
(defn strikethrough-style [outgoing]
(cond-> (update (default-text-style) :style
assoc :text-decoration-line :line-through)
outgoing
(update :style assoc :color colors/white-persist)))
(def code-block-background "#2E386B") (def code-block-background "#2E386B")
(defn inline-code-style [] (defn inline-code-style []

View File

@ -2,7 +2,7 @@
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead", "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
"owner": "status-im", "owner": "status-im",
"repo": "status-go", "repo": "status-go",
"version": "v0.62.11", "version": "v0.62.12",
"commit-sha1": "4ecca1169d2e0a07b4e0cf5a7a3f4044216c678f", "commit-sha1": "a36144983aa99cf14b8fd1a9969ee26a6aeff8f8",
"src-sha256": "189igps203m2yf3gcqjrghqnncf7vgl3p3bjcrk5dp2ym00jfr9f" "src-sha256": "0ggs7sqf5w7yr049lfdz7wr8aby0vzaybj3v0ln96f8njghvzwfq"
} }