Giter Site home page Giter Site logo

Comments (3)

csharpfritz avatar csharpfritz commented on July 18, 2024

Yes! This is the same concept as #38

from corewiki.

essenbee avatar essenbee commented on July 18, 2024

Here are my initial thoughts on this, without using Wikitext, which I am not sure I understand:

  • allow authors to create links to internal CoreWiki pages using the normal Markdown [text](link) syntax (where the link does not begin with http/https) as they create/edit an article
  • the code will take the user input for the "link" and use the FriendlyUrl() helper to create a slug in the format currently used, and replace what the user entered with this value
  • on saving, use a regular expression to locate all such links in the article
  • determine if the links already exist as slugs in the database
  • present the author with the choice to create any articles that do not already exist, based on the above. User must be logged in to do this
  • Basic page for the above. I am no UI developer, so my UI will be simple in all likelihood. Someone more skilled should style it and make it look nice

I am no regular expression expert. Here is what I have come up with:

(\[[\w\s.\-_:;\!\?]*[\]][\(])((?!(http|https))[\w\s\-_]*)([\)])

The expression is using grouping so that I can extract the various parts of matches in code. I should write unit tests that exercise the regular expression. Any help that someone can offer regarding polishing the regular expression gratefully received.

from corewiki.

c17r avatar c17r commented on July 18, 2024

@csharpfritz #123 has been merged, so this should probably be closed.

from corewiki.

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.