Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: edit url should support versioned subdirectories #1154

Merged
merged 1 commit into from
Dec 11, 2018

Conversation

endiliey
Copy link
Contributor

Motivation

Fix #1153

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Create learn/01-intro-to-muster.md

---
id: version-1.0.11-introduction
title: Introduction
original_id: introduction
---

Muster is a reactive state and data management library. It can:
- Collect data from multiple sources (user input, files, APIs, databases, etc.)
- Process the data in a reactive way, meaning that when the source (e.g. a file) changes, your logic that depends on that file gets re-run
- Manage dependencies between different pieces of logic
- Expose the data and logic as a graph
- Transparently handle synchronous and asynchronous data

![Muster Intro](assets/muster-intro.png)

Every Muster application expresses its data as a set of graph **nodes**, which can create links (dependencies) between each other. Muster introduces a concept of typed nodes, and different types of edges (called **operations**) between these nodes.

Muster operates a **virtual** graph, in the sense that Muster allows the creation of **matchers** which don’t exist in memory until they’re invoked – so the potential, virtual nodes are there but the actual entities haven’t yet been retrieved.

Before

before

After

after

Solution Explained:

Simple regex fix. This is because we should lazyly quantify the preceding characters to match the subdirectories

Example:
version-.*?\/(.*\.md) for version-1.0.11/learn/01-intro-to-muster.md is learn/01-intro-to-muster.md
but version-.*\/(.*\.md) for version-1.0.11/learn/01-intro-to-muster.md is 01-intro-to-muster.md which is wrong

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 10, 2018
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 600311d

https://deploy-preview-1154--docusaurus-preview.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit ba78491

https://deploy-preview-1154--docusaurus-preview.netlify.com

Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@endiliey endiliey changed the title fix: edit url should support subdirectories fix: edit url should support versioned subdirectories Dec 11, 2018
@endiliey endiliey merged commit f125494 into facebook:master Dec 11, 2018
@endiliey endiliey deleted the editurl branch December 11, 2018 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EditUrl doesn't support sub-directories.
4 participants