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

Standardize variable syntax #743

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

jamos-tay
Copy link
Contributor

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [X] Other, please explain: Refactoring

Fixes #710

What is the rationale for this request?

Two different variable syntaxes are used, <span id=...> for include and global variables, <variable name=...> for page variables. For standardization we should only use one.

What changes did you make? (Give an overview)

Change all variables to use <variable name=...> syntax.

Testing instructions:

I left compatibility for <span id=...> - prevents old sites from breaking. Should it be removed?

Can confirm something like this works:

<span id="a">1</span>
<variable name="b">2</variable>

@yamgent
Copy link
Member

yamgent commented Mar 3, 2019

I left compatibility for <span id=...> - prevents old sites from breaking. Should it be removed?

I think it should be removed eventually, don't see the value in the old syntax since it is hard to differentiate it from actual <span>s.

We will deprecate this feature first, then remove it by the next big release as per standard practice.

yamgent
yamgent previously approved these changes Mar 3, 2019
Copy link
Member

@yamgent yamgent left a comment

Choose a reason for hiding this comment

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

Looked through the updated logic, and also skimmed around the documentation a bit to see whether all necessary replacements are done, seems generally fine to me 👍.

@jamos-tay
Copy link
Contributor Author

Rebased to solve merge conflict

@yamgent yamgent added this to the v1.19.3 milestone Mar 6, 2019
@yamgent
Copy link
Member

yamgent commented Mar 6, 2019

Proposed commit message:

Standardize variable declaration (#743)

We use <span> to declare variables in include and global variables.

<span> variables are difficult to differentiate from actual <span>
tag uses. Furthermore, in places where this differentiation is
important (e.g. pages where <span>s are extremely common), we are
forced to use <variable> tags, rather than <span> tags. This results in
two different (and confusing) ways of declaring variables.

Let's standardize all variable declaration to use <variable> instead
of <span>.

The processing of <span> variables are currently left intact, but
they are deprecated and should be removed in a subsequent release.

@yamgent yamgent merged commit c6845fc into MarkBind:master Mar 7, 2019
yamgent pushed a commit to yamgent/markbind that referenced this pull request Mar 8, 2019
We use <span> to declare variables in include and global variables.

<span> variables are difficult to differentiate from actual <span>
tag uses. Furthermore, in places where this differentiation is
important (e.g. pages where <span>s are extremely common), we are
forced to use <variable> tags, rather than <span> tags. This results in
two different (and confusing) ways of declaring variables.

Let's standardize all variable declaration to use <variable> instead
of <span>.

The processing of <span> variables are currently left intact, but
they are deprecated and should be removed in a subsequent release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize the syntax for defining variables
2 participants