Comments (6)
I think this comes from how classes are dynamically added to the element for syntax highlighting! When you add a title, it gets its own class so that it can be customized in the stylesheet and it seems that having a space isn't accounted for in the transform. This happens here: https://github.com/irrationalistic/atom-tasks/blob/master/lib/tasks.cson#L12
This uses downcase to set everything to lowercase, so i'm trying to see if there's a way to also override spaces so that we don't get this weird behavior.
from atom-tasks.
Hi @irrationalistic ,
the weird thing is that this occurs only when you write About (upper or lowercase) after the space.
If you write
something(space)somethingelse:
everything works as expected
from atom-tasks.
@massic80: it's mostly just a weird coincidence that there is a special style for anything with the "about" class! You can try it with test cursor:
or test indent-guide:
or any of the classes available in that context. Essentially, to help with custom styling for groupings or headings, the text of the heading is added to the resulting syntax as a class (which you can target in your custom stylesheet). This ends up having conflicts since a space is actually a delimiter in class names, so if you use a single word as header, it ends up something like class="syntax--source syntax--myheader
, but if you put a space in the header, it'd end up like class="syntax--source syntax--my header
, which is actually three classes!
from atom-tasks.
So it looks like the only transforms supported are downcase
and upcase
in the first-mate library: https://github.com/atom/first-mate/blob/254d43b7a941a7fe63a4ad85a7766108561fec7c/src/pattern.coffee#L3
This means that fixing this particular issue could take a few different paths:
- Do nothing and just try to avoid using "about" as the second word
- Remove the custom classname functionality from headers
- Submit PR to first-mate to add more support for textmate transforms (https://macromates.com/textmate/manual/references#format-string)
I'm inclined to go with 2 on this one, but i'm not sure of the usage of custom styles that might break. I think i just added the functionality when building this, so i don't think it was a requested feature and folks may not even know about it. What are your thoughts?
from atom-tasks.
Whoops, I didn't notice you asked a question :)
Don't know what's best: is option 2 hard to implement?
from atom-tasks.
Hi! I also found out that "console" keyword pushed the ":" to a new line
from atom-tasks.
Related Issues (20)
- Settings "filename pattern"
- Fix where checkbox is placed
- Add option to archive project itself
- Bullet-style Line Wrapping/Indenting
- Is this package still in development? ES6? Custom Text Editor view? HOT 1
- HTMLDocument.registerElement is deprecated.
- Toggle Timestamp Feature HOT 4
- Multiple prefixes for different tag types HOT 1
- Status bar showing all tasks as incomplete
- Update: Tasks package not activating on Atom 1.24.x and later HOT 18
- Please make cmd+enter convert current line to task
- Add syntax highlighting for basic tags HOT 1
- Tasks 2.9.1 HOT 1
- "Cannot find module" error on Atom 1.25.0-beta.0. HOT 3
- Failed to activate the tasks package HOT 15
- Cannot find module 'underscore' HOT 3
- Uncaught TypeError: ref3.tokenizedBuffer.onDidTokenize is not a function HOT 1
- I can't open the tasks on my atom HOT 1
- property 'TouchBarButton' of undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-tasks.