Skip to content

Commit

Permalink
update code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CacheMeOwside committed Jun 5, 2024
1 parent b5b5f3c commit 860c589
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/Classifai/Features/TextToSpeech.php
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,14 @@ public function normalize_post_content( int $post_id ): string {
return $post_content;
}

/**
* Filters the post content by stripping off HTML subscript and superscript tags
* with its content for text to speech generation.
*
* @param string $post_content The post content.
*
* @return string The filtered post content.
*/
public function strip_sub_sup_tags( $post_content ) {
$post_content = preg_replace( '/<sub>.*?<\/sub>|<sup>.*?<\/sup>/', '', $post_content );
return $post_content;
Expand Down

0 comments on commit 860c589

Please sign in to comment.