Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar Desktop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar Desktop
Commits
0133f74b
Verified
Commit
0133f74b
authored
1 year ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Implement HTML description lists
parent
7fb2b19f
No related branches found
No related tags found
1 merge request
!366
Add support for HTML blog posts
Pipeline
#15428
passed
1 year ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt
+12
-2
12 additions, 2 deletions
...in/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt
with
12 additions
and
2 deletions
briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt
+
12
−
2
View file @
0133f74b
...
@@ -97,9 +97,10 @@ fun HtmlText(
...
@@ -97,9 +97,10 @@ fun HtmlText(
// "a", "b"/"strong", "i"/"em"/"cite", "u", "strike", "sub", "sup", "q", "small"
// "a", "b"/"strong", "i"/"em"/"cite", "u", "strike", "sub", "sup", "q", "small"
// "ul", "ol", "li"
// "ul", "ol", "li"
// "br", "p", "blockquote", "pre",
// "br", "p", "blockquote", "pre",
// "dd", "dl", "dt",
// Elements from Jsoup's safelist we could still add support for:
// Elements from Jsoup's safelist we could still add support for:
//
"dd", "dl", "dt",
"span"
// "span"
val
h1
=
MaterialTheme
.
typography
.
h1
val
h1
=
MaterialTheme
.
typography
.
h1
val
h2
=
MaterialTheme
.
typography
.
h2
val
h2
=
MaterialTheme
.
typography
.
h2
...
@@ -298,7 +299,16 @@ fun HtmlText(
...
@@ -298,7 +299,16 @@ fun HtmlText(
withinPre
=
false
withinPre
=
false
pop
()
pop
()
}
}
)
),
// Implementation for description lists. Ignore "dl" and just add indent for "dt" and "dd".
"dt"
to
HtmlNode
(
start
=
{
pushIndent
(
0
.
sp
)
},
end
=
{
popIndent
()
}
),
"dd"
to
HtmlNode
(
start
=
{
pushIndent
(
20
.
sp
)
},
end
=
{
popIndent
()
}
),
)
)
val
doc
=
Jsoup
.
parse
(
html
)
val
doc
=
Jsoup
.
parse
(
html
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment