mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Merge branch 'main' of gitlab.com:bashrc2/epicyon
						commit
						f67d2e707c
					
				
							
								
								
									
										2
									
								
								tests.py
								
								
								
								
							
							
						
						
									
										2
									
								
								tests.py
								
								
								
								
							|  | @ -5573,6 +5573,7 @@ def _test_valid_hash_tag(): | |||
|     assert valid_hash_tag('한국어') | ||||
|     assert valid_hash_tag('테스트') | ||||
|     assert valid_hash_tag('테_스트') | ||||
|     assert valid_hash_tag('c99') | ||||
|     assert not valid_hash_tag('this-is-invalid') | ||||
|     assert not valid_hash_tag('ThisIsNotValid!') | ||||
|     assert not valid_hash_tag('#ThisIsAlsoNotValid') | ||||
|  | @ -5581,6 +5582,7 @@ def _test_valid_hash_tag(): | |||
|     assert not valid_hash_tag('ThisIsAlsoNotValid"') | ||||
|     assert not valid_hash_tag('This Is Also Not Valid"') | ||||
|     assert not valid_hash_tag('This=IsAlsoNotValid"') | ||||
|     assert not valid_hash_tag('12345') | ||||
| 
 | ||||
| 
 | ||||
| def _test_markdown_to_html(): | ||||
|  |  | |||
							
								
								
									
										3
									
								
								utils.py
								
								
								
								
							
							
						
						
									
										3
									
								
								utils.py
								
								
								
								
							|  | @ -3535,6 +3535,9 @@ def valid_hash_tag(hashtag: str) -> bool: | |||
|     # long hashtags are not valid | ||||
|     if len(hashtag) >= 32: | ||||
|         return False | ||||
|     # numbers are not permitted to be hashtags | ||||
|     if hashtag.isdigit(): | ||||
|         return False | ||||
|     if set(hashtag).issubset(VALID_HASHTAG_CHARS): | ||||
|         return True | ||||
|     if _is_valid_language(hashtag): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue