Meme fix to <>, ~~ and ~> parsing (does not fully solve the issue but at least hides it from the user)
Allow ascii characters to be used for color dropdown symbols
This commit is contained in:
		
							parent
							
								
									9451822e09
								
							
						
					
					
						commit
						bc8158cc96
					
				@ -2023,19 +2023,28 @@ QString Courtroom::filter_ic_text(QString p_text, bool html, int target_pos, int
 | 
			
		||||
  if (p_text.trimmed().startsWith("~~"))
 | 
			
		||||
  {
 | 
			
		||||
    p_text.remove(p_text.indexOf("~~"), 2);
 | 
			
		||||
    target_pos -= 2;
 | 
			
		||||
    if (target_pos != -1)
 | 
			
		||||
    {
 | 
			
		||||
      target_pos = qMax(0, target_pos - 2);
 | 
			
		||||
    }
 | 
			
		||||
    align = "center";
 | 
			
		||||
  }
 | 
			
		||||
  else if (p_text.trimmed().startsWith("~>"))
 | 
			
		||||
  {
 | 
			
		||||
    p_text.remove(p_text.indexOf("~>"), 2);
 | 
			
		||||
    target_pos -= 2;
 | 
			
		||||
    if (target_pos != -1)
 | 
			
		||||
    {
 | 
			
		||||
      target_pos = qMax(0, target_pos - 2);
 | 
			
		||||
    }
 | 
			
		||||
    align = "right";
 | 
			
		||||
  }
 | 
			
		||||
  else if (p_text.trimmed().startsWith("<>"))
 | 
			
		||||
  {
 | 
			
		||||
    p_text.remove(p_text.indexOf("<>"), 2);
 | 
			
		||||
    target_pos -= 2;
 | 
			
		||||
    if (target_pos != -1)
 | 
			
		||||
    {
 | 
			
		||||
      target_pos = qMax(0, target_pos - 2);
 | 
			
		||||
    }
 | 
			
		||||
    align = "justify";
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -441,7 +441,7 @@ QString AOApplication::get_chat_markdown(QString p_identifier, QString p_chat)
 | 
			
		||||
  if (f_result == "")
 | 
			
		||||
    f_result = read_design_ini(p_identifier, default_path);
 | 
			
		||||
 | 
			
		||||
  return f_result;
 | 
			
		||||
  return f_result.toLatin1();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QColor AOApplication::get_chat_color(QString p_identifier, QString p_chat)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user