Quote:
Originally Posted by davidfor
As mentioned in the other thread, you could do it using a regex function in the editor. A quick and dirty one would be:
Code:
import math
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
boldlen = math.ceil(len(match[0])/2)
boldedword = '<b>' + match[0][:boldlen] + '</b>' + match[0][boldlen:]
return boldedword
With the search as "\b\w+\b", it will make the changes. But, it does not distinguish between words in the text and tags. And doesn't handle if you have already made the changes.
|
Code:
p{
font-weight: bolder;
}
this is bolder all of text code in cailbre ,pls give me more help :谢谢: