UPPER CASE, class or a way to style it


#1

Is there a way to capture UPPERCASE words and bold them out?

Either CSS or JS.

(i need full words, something like this: regex (^A-Z)$/g )

Thank you.


#2

In this case, because what you want to do is outside of what the TaskPaper engine looks for, you need to use some code independently of TaskPaper.

Fortunately, that is pretty simple to do. I will provide a link to some code in Ruby (already included in all Macs) that accomplishes what you want. Just read the whole discussion since they include some interesting points. And what you would be replace is the same text with the ** ** additions.

Search and replace using Ruby.

Ruby examples to replace text.

You could also use Atom and their REGEX search and replace the UPPER CASE WORDS to upper case words surrounded by ** ** . Just change ATOM from “case insensitive” to “case sensitive”. This has the advantage to let you know if your regex is okay or not. In your case, I don’t think the regex you provided will get what you want. Use regexr to test your regex.


#3

I don’t think so… if you mean to automatically bold any text that’s uppercase.


#4

Well, the parser does look for example at “:” at the end of the line, and it can identify it as item[data-type=project]

I wonder if there is a way (maybe even setting wise) to add additional rules, including CAPS words.

Thank you.


#5

Yes, TaskPaper is doing parsing behind the scenes. Just isn’t possible to extend the parser via scripting right now. And I think unlikely that I’ll add in the future. I do plan to add support for basic inline formatting (bold, italic, links) in eventual TaskPaper 4. But that’s still a ways off.


#6

@sneila, sorry about misleading you. Since I mentioned somewhere else, I use MMD on my taskpaper and that is how I usually deal with emphasis and adding bold elements to my text. This is so integral to my workflow that I completely forgot. I just wanted to clarify my comments above :slight_smile:


#7

@Victor, no problem mate. Your intentions are perfect, just not for my workflow. Thank you though :slight_smile: