Coder Social home page Coder Social logo

Comments (11)

protesilaos avatar protesilaos commented on July 28, 2024

We will need to look for : or =, with optional space before =.

Oh, of course! Sorry about that. Will fix it right away.

Or do you plan to deeply bake in the reliance on #+identifier / identifier: / identifier = matches?

I think this is open to discussion, given that we still are at the point where we can make breaking changes.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

The "^\\(#\\+\\)?\\(identifier\\)\\([\s\t]+\\)?[:=]\\([\s\t]+?\\)?\"?\\([0-9T]+\\)\"?" matches all of the following with M-x re-builder. Is there some other permutation we need to consider?

identifier = "20220611T114910"
identifier= 20220611T114910
identifier=20220611T114910
identifier= "20220611T114910"
identifier     ="20220611T114910"



identifier : "20220611T114910"
identifier: 20220611T114910
identifier:20220611T114910
identifier: "20220611T114910"
identifier     :"20220611T114910"

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

Is there some other permutation we need to consider?

Nope this covers (more than) everything!


(more than): Few illegal cases like identifier= 20220611T114910 and identifier=20220611T114910 too. But that's OK.


Regexp suggestion:

"\\bidentifier\\s-*[:=]\\s-*\"?\\([0-9T]+\\)"

image

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Regexp suggestion:

Vastly superior! Thanks!

I guess now we need to abstract the "indentifier" part, right? That gives the user maximum flexibility.

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

Suggestion 2:

"^.?.?\\b\\(identifier\\|ID\\)\\s-*[:=]\\s-*\"?\\([0-9T]+\\)"

image

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

I think ^.?.?\\b will be good enough to avoid any false matches.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Very wel!! Since you wrote it, do you want to submit a PR (or send a patch)? If you are on mobile, I can commit with you as the author (if you want).

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

I haven't tested it properly and won't have time to do so until tonight (~10 hrs from now).

But I can create a PR and let you decide. If the PR is still open after I am done testing, and I need to update it, I'll do so, else will create another PR

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Okay, thank you! Will wait then.

from denote.

kaushalmodi avatar kaushalmodi commented on July 28, 2024

Closing this as it was fixed by #11.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Thank you!

from denote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.