mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix : Code block parser implementation (#2046)
* fix: Code block implementation * fix: Added test to cover CodeBlock * fix: typos * fix: Code block implementation * fix: typos
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||
|
||||
class CodeBlockNodeParser extends NodeParser {
|
||||
const CodeBlockNodeParser();
|
||||
|
||||
@override
|
||||
String get id => 'code_block';
|
||||
|
||||
@override
|
||||
String transform(Node node) {
|
||||
return '```\n${node.attributes['code_block']}\n```';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user