🎨 Support searching PDF asset content https://github.com/siyuan-note/siyuan/pull/8985

This commit is contained in:
Daniel 2023-08-17 11:58:54 +08:00
parent 19a295e157
commit 3b549f46f2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 22 additions and 8 deletions

View file

@ -1,3 +1,19 @@
// SiYuan - Refactor your thinking
// Copyright (c) 2020-present, b3log.org
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
package model
import (
@ -6,7 +22,7 @@ import (
func TestPDFParser(t *testing.T) {
p := &PdfAssetParser{}
res := p.Parse("../../testdata/parsertest.pdf")
res := p.Parse("../testdata/parsertest.pdf")
if res == nil || res.Content == "" {
t.Fatalf("empty or nil PDF content result")
}