Skip to content

Commit fceb66c

Browse files
committed
chore: export option
1 parent 768245e commit fceb66c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

collab/src/document/document.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ impl Document {
459459
/// This function will only return the plain text of the document, it will not include the formatting.
460460
/// For example, for the linked text, it will return the plain text of the linked text, the link will be removed.
461461
pub fn to_plain_text(&self) -> Vec<String> {
462-
self.to_plain_text_with_options(PlainTextExportOptions::default())
462+
self.to_plain_text_with_options(&PlainTextExportOptions::default())
463463
}
464464

465-
pub fn to_plain_text_with_options(&self, options: PlainTextExportOptions) -> Vec<String> {
465+
pub fn to_plain_text_with_options(&self, options: &PlainTextExportOptions) -> Vec<String> {
466466
let txn = self.collab.transact();
467467
self.body.to_plain_text_with_options(txn, options)
468468
}
@@ -654,13 +654,13 @@ impl DocumentBody {
654654

655655
/// Get the plain text of the document.
656656
pub fn to_plain_text<T: ReadTxn>(&self, txn: T) -> Vec<String> {
657-
self.to_plain_text_with_options(txn, PlainTextExportOptions::default())
657+
self.to_plain_text_with_options(txn, &PlainTextExportOptions::default())
658658
}
659659

660660
pub fn to_plain_text_with_options<T: ReadTxn>(
661661
&self,
662662
txn: T,
663-
options: PlainTextExportOptions,
663+
options: &PlainTextExportOptions,
664664
) -> Vec<String> {
665665
// use DocumentParser to parse the document
666666
let resolver = options.resolver();

0 commit comments

Comments
 (0)