Skip to content

Commit

Permalink
chore: readme image update, bugfix for latest pret
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatNerdSquared committed Dec 13, 2023
1 parent b9faf25 commit 029dddb
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 78 deletions.
Binary file modified assets/readme-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class MyApp extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return MaterialApp(
restorationScopeId: uuID.v4(),
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xffb69d7c)),
Expand Down
16 changes: 8 additions & 8 deletions lib/model/json_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ class JsonBackend extends PretJsonManager {
@override
String schemaVersion = '2.0.0';
@override
Map<String, List<String>> dropFields = {};
@override
Map get freshJson => <String, dynamic>{
'schema': schemaVersion,
'tags': [],
'entries': {},
};
'schema': schemaVersion,
'tags': {},
'entries': {},
};

Map<String, PeregrineEntry> readEntriesFromJson() {
final contentsMap = pretLoadJson();
Expand Down Expand Up @@ -58,10 +60,8 @@ class JsonBackend extends PretJsonManager {
mentionedContacts: findContacts(value['input']),
)
});
jsonWriteWrapper((initialData) {
var item = freshJson;
item['entries'] = data;
return item;
dangerousJsonReplace({
'entries': data,
});
return data;
}
Expand Down
6 changes: 4 additions & 2 deletions lib/widgets/peregrine_entry_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ class PeregrineEntryCard extends ConsumerWidget {
const Divider(),
...MarkdownGenerator(
generators: [latexGenerator],
inlineSyntaxes: [LatexSyntax()],
inlineSyntaxList: [LatexSyntax()],
linesMargin: const EdgeInsets.all(0),
).buildWidgets(
stripTagOnlyLines(entry.input),
config: MarkdownConfig(configs: [
ImgConfig(builder: (url, attributes) {
if (url.contains(r'data:image/png;base64,')) {
Expand All @@ -76,7 +78,7 @@ class PeregrineEntryCard extends ConsumerWidget {
),
),
]),
).buildWidgets(stripTagOnlyLines(entry.input)),
),
const Padding(
padding: EdgeInsets.only(
top: PretConfig.minElementSpacing,
Expand Down
Loading

0 comments on commit 029dddb

Please sign in to comment.