Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable soft line break for markdown. #139

Merged
merged 3 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/lib/comments/widgets/comment_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Comment extends StatelessWidget {
MarkdownBody(
data: userComment,
selectable: true,
softLineBreak: true,
styleSheet: MarkdownStyleSheet.fromTheme(Theme.of(context))
.copyWith(a: linkStyle(context, 14)),
onTapLink: (url, _, __) => launchURL(url, context: context),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/markdown/markdown_support.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MarkdownSupport extends StatelessWidget {
TextStyle(color: Colors.grey, fontSize: 14, fontFamily: rubik);
return MarkdownBody(
data:
"[Markdown](https://sharezone.net/markdown): \*\***fett**\\*\*, \**kursiv*\\*, Zeilenumbruch: \\",
"[Markdown](https://sharezone.net/markdown): \*\***fett**\\*\*, \**kursiv*\\*",
styleSheet: MarkdownStyleSheet(p: style, a: linkStyle(context, 14)),
selectable: true,
onTapLink: (link, _, __) => launchURL(link),
Expand Down
1 change: 1 addition & 0 deletions app/lib/pages/blackboard/details/blackboard_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ class _Text extends StatelessWidget {
return MarkdownBody(
data: text,
selectable: true,
softLineBreak: true,
styleSheet: MarkdownStyleSheet.fromTheme(
theme.copyWith(
textTheme: theme.textTheme.copyWith(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ class _HomeworkDescription extends StatelessWidget {
subtitle: MarkdownBody(
data: description,
selectable: true,
softLineBreak: true,
styleSheet: MarkdownStyleSheet.fromTheme(
theme.copyWith(
textTheme: theme.textTheme.copyWith(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ class _TimetableEventDetailsPage extends StatelessWidget {
selectable: true,
onTapLink: (url, _, __) =>
launchURL(url, context: context),
softLineBreak: true,
styleSheet: MarkdownStyleSheet.fromTheme(
theme.copyWith(
textTheme: theme.textTheme.copyWith(
Expand Down
1 change: 1 addition & 0 deletions app/lib/widgets/blackboard/blackboard_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class _Text extends StatelessWidget {
padding: const EdgeInsets.only(top: 16),
child: MarkdownBody(
data: text,
softLineBreak: true,
onTapLink: (url, _, __) => launchURL(url),
styleSheet: MarkdownStyleSheet.fromTheme(
theme.copyWith(
Expand Down