Skip to content

Commit

Permalink
adapt to newer libfolia
Browse files Browse the repository at this point in the history
  • Loading branch information
kosloot committed Dec 3, 2024
1 parent ec22a93 commit 22aa70a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tokenize.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ namespace Tokenizer {
// there is already text at thus level, bail out.
return;
}
if ( root->isSubClass( folia::Linebreak_t ) ){
if ( root->isSubClass<folia::Linebreak>() ){
// exception
return;
}
Expand Down Expand Up @@ -1218,7 +1218,7 @@ namespace Tokenizer {
}
else {
const folia::FoliaElement *par = el->parent();
if ( par->element_id() == folia::BASE ){
if ( par->isinstance<folia::FoLiA>() ){
// we went all up without avail...
return "";
}
Expand Down Expand Up @@ -1308,7 +1308,7 @@ namespace Tokenizer {
}
else if ( (tok.role & BEGINOFSENTENCE)
&& root != sent
&& root->element_id() == folia::Sentence_t ){
&& root->isinstance<folia::Sentence>() ){
// Ok, another Sentence in a quote
if ( i > 0 && !(toks[i-1].role & BEGINQUOTE) ){
// close the current one, and start a new one.
Expand Down Expand Up @@ -1434,7 +1434,7 @@ namespace Tokenizer {
args["set"] = root->doc()->default_set( folia::AnnotationType::PARAGRAPH );
args["xml:id"] = root->doc()->id() + ".p." + TiCC::toString(++p_count);
folia::Paragraph *p = new folia::Paragraph( args, root->doc() );
if ( root->element_id() == folia::Text_t ){
if ( root->isinstance<folia::Text>() ){
if ( tokDebug > 5 ){
DBG << "append_to_folia, add paragraph to Text" << endl;
}
Expand Down Expand Up @@ -1801,7 +1801,7 @@ namespace Tokenizer {
// multiple sentences. We need an extra Paragraph.
// But first check if this is allowed!
folia::FoliaElement *rt;
if ( e->acceptable(folia::Paragraph_t) ){
if ( e->acceptable<folia::Paragraph>() ){
folia::KWargs args;
string e_id = e->id();
if ( !e_id.empty() ){
Expand Down

0 comments on commit 22aa70a

Please sign in to comment.